/
area/
classes/net/sourceforge/pain/logic/
classes/net/sourceforge/pain/logic/event/
classes/net/sourceforge/pain/logic/fn/util/
classes/net/sourceforge/pain/network/console/
classes/net/sourceforge/pain/plugin/
classes/net/sourceforge/pain/plugin/reset/
classes/net/sourceforge/pain/plugin/shutdown/
classes/net/sourceforge/pain/plugin/social/
classest/net/sourceforge/pain/db/data/
doc/
doc/paindb/resources/
src/net/sourceforge/pain/logic/
src/net/sourceforge/pain/logic/event/
src/net/sourceforge/pain/logic/fn/util/
src/net/sourceforge/pain/network/console/
src/net/sourceforge/pain/network/console/telnet/
src/net/sourceforge/pain/plugin/
src/net/sourceforge/pain/plugin/command/
src/net/sourceforge/pain/plugin/reset/
src/net/sourceforge/pain/plugin/shutdown/
src/net/sourceforge/pain/plugin/social/
src/net/sourceforge/pain/util/
tests/
tests/net/sourceforge/pain/db/data/
package net.sourceforge.pain.data.prototype;


import net.sourceforge.pain.data.type.*;
import net.sourceforge.pain.db.*;


/**
 any Role instance with this type considered as Element of with internal Space (space inside object)
 */
public final class SpacePrototype extends Prototype {

	/**Space capacity of the phisical objects, measured in the same units as Physical.size */
	public static final int CAPACITY = 1 + LAST_BASE_FIELD_INDEX;

	/** any space could have specific name, or not:)  )*/
	public static final int SPACE_NAME = 2 + LAST_BASE_FIELD_INDEX;

	/**We can look around in any Space, event in backpack or chests*/
	public static final int SPACE_DESC = 3 + LAST_BASE_FIELD_INDEX;


	public static final int NFIELDS = 4 + LAST_BASE_FIELD_INDEX;

    public final static Class superroles[] = new Class[]{PrototypeInfo.class};

	public SpacePrototype() {
	}

	public SpacePrototype(PainDB db){
		super(db);
	}

	public DbClassSchema provideSchema() {
		byte types[] = new byte[NFIELDS];
		String names[] = new String[NFIELDS];

		fillSuperSchema(types, names);

		types[CAPACITY] = DbType.INT;
		names[CAPACITY] = "capacity";

		types[SPACE_NAME] = DbType.STRING;
		names[SPACE_NAME] = "spaceName";

		types[SPACE_DESC] = DbType.STRING;
		names[SPACE_DESC] = "spaceDesc";

		return new DbClassSchema(types, names);
	}

	public String getSpaceDesc() {
		return getString(SPACE_DESC);
	}

	public void setSpaceDesc(String value) {
		setString(SPACE_DESC, value);
	}

	public String getSpaceName() {
		return getString(SPACE_NAME);
	}

	public void setSpaceName(String value) {
		setString(SPACE_NAME, value);
	}

	public int getCapacity() {
		return getInt(CAPACITY);
	}

	public void setCapacity(int value) {
		setInt(CAPACITY, value);
	}

	public Class getPrototypedRoleClass() {
		return Space.class;
	}

	protected Class[] getSuperroles() {
		return superroles;
	}
}