package net.sourceforge.pain.data.type;
import net.sourceforge.pain.data.*;
import net.sourceforge.pain.db.*;
import java.util.*;
/**
* Some Logical group of spaces.
* One space can present in many space groups
* Example of space group: Area, Reset Group, All Magic Places, All Market places and so on
*/
public final class SpaceGroup extends Role {
public static final int SPACES = 1 + LAST_BASE_FIELD_INDEX;
public static final int NFIELDS = 2 + LAST_BASE_FIELD_INDEX;
public SpaceGroup() {
}
public SpaceGroup(PainDB db) {
super(db);
}
public DbClassSchema provideSchema() {
byte types[] = new byte[NFIELDS];
String names[] = new String[NFIELDS];
fillSuperSchema(types, names);
types[SPACES] = DbType.REFERENCE_SET;
names[SPACES] = "spaces";
return new DbClassSchema(types, names);
}
public Set getSpaces() {
return getRefSet(SPACES);
}
public void addSpace(Space space) {
getSpaces().add(space);
}
}