public abstract class PersistentRecord extends SRecordInstance
SRecordInstance.BrokenOptimisticLockException
Modifier and Type | Field and Description |
---|---|
static java.lang.Object |
DEFAULT_VALUE
Key value for our "default value" extension to the SimpleORM api
|
static java.lang.Object |
FORM_META_KEY
Key for the field meta object
|
static java.lang.Object |
INDEXED
Key value for our "indexed" extension to the SimpleORM api
|
static java.lang.Object |
UNIQUE
Key value for our "unique" extension to the SimpleORM api
|
Modifier | Constructor and Description |
---|---|
protected |
PersistentRecord() |
Modifier and Type | Method and Description |
---|---|
boolean |
getBoolean(SFieldMeta field)
Overridden in order to work around the fact that the base doesn't work well, expects them to be exactly
Boolean.TRUE or Boolean.FALSE (like, the actual objects).
|
java.lang.Double |
getDoubleObj(SFieldMeta field)
Provides a null-safe alternative to getDouble(), which returns zero if the field was null.
|
java.lang.Integer |
getIntObj(SFieldMeta field)
Provides a null-safe alternative to getInt(), which returns zero if the field was null.
|
java.lang.Long |
getLongObj(SFieldMeta field)
Provides a null-safe alternative to getLong(), which returns zero if the field was null.
|
abstract RecordMeta<?> |
getMeta()
This must be defined in every user record's definition to access the SRecord which provides the meta data for
this instance.
|
java.lang.String |
getString(SFieldMeta field)
Returns the field as a string, or null if the field was null.
|
void |
installDefaultValues() |
allFields, assertNewRow, assertNotNewRow, defineInitialValue, deleteRecord, doQueryRecord, doValidateRecord, equals, findReference, findReference, findReference, findReference, getBigDecimal, getBytes, getDataSet, getDate, getDouble, getEnum, getInitialValue, getInt, getLogger, getLong, getObject, getRawArrayValue, getReferenceNoQuery, getTime, getTimestamp, hashCode, isAttached, isDeleted, isDirty, isDirty, isEmpty, isNewRow, isNotDestroyed, isNull, isReadOnly, isValid, onQueryRecord, onValidateField, onValidateRecord, setBigDecimal, setBoolean, setBytes, setDate, setDirty, setDouble, setEmpty, setEnum, setInt, setLong, setNewRow, setNull, setObject, setObject, setRawArrayValue, setReadOnly, setReference, setString, setTime, setTimestamp, toString, validatePrimaryKeys, wasInCache
public static final java.lang.Object DEFAULT_VALUE
public static final java.lang.Object INDEXED
public static final java.lang.Object UNIQUE
public static final java.lang.Object FORM_META_KEY
public void installDefaultValues()
public abstract RecordMeta<?> getMeta()
SRecordInstance
SRecord getMeta() { return meta; };
The actual meta
variable is thus not Serialized, but it would not be anyway as it is usually static.
getMeta
in class SRecordInstance
public java.lang.String getString(SFieldMeta field)
getString
in class SRecordInstance
public java.lang.Integer getIntObj(SFieldMeta field)
field
- The filed to retrievepublic java.lang.Long getLongObj(SFieldMeta field)
field
- The filed to retrievepublic java.lang.Double getDoubleObj(SFieldMeta field)
field
- The filed to retrievepublic boolean getBoolean(SFieldMeta field)
getBoolean
in class SRecordInstance