net.sourceforge.pain.data
Class AffectData
java.lang.Object
net.sourceforge.pain.db.DbObject
net.sourceforge.pain.data.AffectData
- Direct Known Subclasses:
- TimedAffectData
- public class AffectData
- extends DbObject
Affects persistent image base class
Note: Only one affect could be applied to the specified
object role(in opposite to object triggers)
Affected role could be null.
All subclasses of AffectData and TimedAffectData
are DbObjects and should add only new fields to save
All subclasses should be defined in data.affects package
and should not contain any logical code.
Methods inherited from class net.sourceforge.pain.db.DbObject |
delete, 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, 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 |
LAST_BASE_FIELD_INDEX
protected static int LAST_BASE_FIELD_INDEX
- used by subclasses
AffectData
public AffectData()
AffectData
public AffectData(PainDB db,
Role role,
java.lang.Class affectImplClass,
int affectTypeId)
throws java.lang.Exception
- Parameters:
db
- role
- - affected roleaffectImplClass
-
- Throws:
java.lang.Exception
provideSchema
protected DbClassSchema provideSchema()
- Description copied from class:
DbObject
- Every time we add new DbObject of the unknown class to database
this method is called. DbClass instance will be automatically created.
It's called only once for every new class.
- Specified by:
provideSchema
in class DbObject
fillSuperSchema
protected void fillSuperSchema(byte[] types,
java.lang.String[] names)
getAffectType
public final int getAffectType()
getAffectedRole
public Role getAffectedRole()
- affected role is allowed to be null
getAffectClassName
public java.lang.String getAffectClassName()
- suffix of affect class name in "...logic.affect." package
getAffectOffTime
public int getAffectOffTime()