|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.pain.db.DbObject net.sourceforge.pain.data.Role
role can be considered as type of object, every object could have only one role of the specified class
Field Summary | |
protected static int |
LAST_BASE_FIELD_INDEX
|
Constructor Summary | |
|
Role()
used by db during startup |
protected |
Role(PainDB db)
|
Method Summary | |
Role |
addRole(java.lang.Class typeClass)
|
void |
delete()
will delete whole object with all roles |
protected int |
fillSuperSchema(byte[] types,
java.lang.String[] names)
Every Role subclass MUST call provideSuperSchema(); |
AffectData |
getAffectData(int affectType)
|
java.util.Iterator |
getAffects()
|
Role |
getRole(java.lang.Class typeClass)
helpers: Used to avoid explicit owner extraction before cast to another type |
java.lang.String |
getRoleClientProperty(java.lang.String propertyName)
dynamic role properties are properties used by clients, but not typical for the role by itself Example: room coords on area editor grid properties assignet to the role but not to the object and removed when role is removed from object |
java.util.Iterator |
getRoleTriggers()
remove method for this iterator will delete trigger as dbobject |
protected java.lang.Class[] |
getSuperroles()
PAiN has dynamic inheritance model, every type(role) should know own superroles with deep=1 this method could be overriden by impl returns array of Role classes |
java.util.Iterator |
getTriggersByEventType(int eventType)
remove method for this iterator will delete trigger as dbobject |
boolean |
hasSubroles()
|
boolean |
is(java.lang.Class typeClass)
|
boolean |
isAffected(int affectType)
|
void |
removeRole(java.lang.Class typeClass)
|
java.util.Iterator |
rolesIterator()
|
boolean |
sameObjectAs(Role obj)
|
void |
setRoleClientProperty(java.lang.String propertyName,
java.lang.String value)
dynamic role properties are properties used by clients, but not typical for the role by itself Example: room coords on area editor grid properties assignet to the role but not to the object and removed when role is removed from object |
Methods inherited from class net.sourceforge.pain.db.DbObject |
getArrayList, getBoolean, getByte, getByteArray, getByteArrayForRead, getChar, getCharArray, getCharArrayForRead, getDB, getDbClass, getDouble, getFloat, getInt, getIntArray, getIntArrayForRead, getIntKeyMap, getLinkedList, getList, getLong, getOid, getReference, getRefSet, getShort, getString, getStringArray, getStringArrayForRead, getStringKeyMap, getStringMap, getStringSet, isClean, isDeleted, isDetached, isDirty, isNew, provideSchema, setBoolean, setByte, setByteArray, setChar, setCharArray, setDouble, setFloat, setInt, setIntArray, setLong, setReference, setShort, setString, setStringArray |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final int LAST_BASE_FIELD_INDEX
Constructor Detail |
public Role()
protected Role(PainDB db)
Method Detail |
protected final int fillSuperSchema(byte[] types, java.lang.String[] names)
protected java.lang.Class[] getSuperroles()
public final boolean hasSubroles()
public final Role getRole(java.lang.Class typeClass)
public final boolean is(java.lang.Class typeClass)
public final Role addRole(java.lang.Class typeClass) throws java.lang.Exception
java.lang.Exception
public final void removeRole(java.lang.Class typeClass) throws java.lang.Exception
java.lang.Exception
public boolean sameObjectAs(Role obj)
public final java.util.Iterator rolesIterator()
public void delete()
delete
in class DbObject
public final java.util.Iterator getTriggersByEventType(int eventType)
public final java.util.Iterator getRoleTriggers()
public final java.util.Iterator getAffects()
public final boolean isAffected(int affectType)
public final AffectData getAffectData(int affectType)
public final java.lang.String getRoleClientProperty(java.lang.String propertyName)
public final void setRoleClientProperty(java.lang.String propertyName, java.lang.String value)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |