public class DBClass extends DBClassConcrete
DBObject.DenormalizeAction
Modifier and Type | Field and Description |
---|---|
static GlobalId |
DBCLASS_GID
DBClass
|
static java.lang.String |
DBCLASS_NAME
DBClass
|
protected DBClassSyncMap[][] |
holderDBClassSyncMap
Cache of the sync map
|
protected DBStoredResult[][] |
holderDBStoredResult
the cache of stored results
|
cacheRowId
holderClassList, holderFieldList, holderFieldListSorted, holderFieldMap, holderJavaClass
ATTRIBUTE_MARVIN, dbClass, ds, NO_LOOP_PARAMS
Modifier | Constructor and Description |
---|---|
protected |
DBClass(DataSource dataSource)
INTERNAL ONLY Exposed for DBRawClass
|
|
DBClass(DBClass dbClass,
DataSource dataSource)
A DBClass is just a DBObject of type DBClass
|
Modifier and Type | Method and Description |
---|---|
void |
checkFullList(long rowUID)
internal check of the cache of the full list of row ids for a class.
|
void |
clearCache() |
void |
clearCache(GlobalKey key)
clear the cache.
|
void |
clearRootHolder()
INTERNAL: Clear the root holder
|
DBObject |
createDBObject(DataSource userDS)
creates a new java object of the specified type.
|
boolean |
disableFieldRecycler(java.lang.String... args) |
java.lang.String |
displayName()
The human display name of this object.
|
protected void |
eventFieldUpdated(DBField field,
java.lang.Object previous,
GlobalKey previousKey,
FldParams params)
update dependent fields.
|
protected boolean |
extCanDeleteDependantObject(DBObject o)
Checks that we can delete the dependent object.
|
protected void |
extFixUp()
Delete the record if no associated company.
|
protected GlobalKey |
extGetDerivedGlobalKey(DBField field,
FldParams params)
Calculate the derived global key for this field.
|
protected java.lang.Object |
extGetDerivedValue(DBField field,
FldParams params)
Returns the derived value of this field.
|
protected void |
extPostDeleteRecord(long transNr)
1) Try to clean up a bit the un needed class index records.
|
protected void |
extPostSaveRecord(long transNr)
Mark the index as dirty
|
void |
extPreValidate()
When a new DBClass is created a default access
restriction is created preventing PUBLIC access to
any record of this type.
|
protected ValidationError |
extValidateField(DBField field,
ValidationList list)
Validates each field in this record.
|
protected void |
extValidateRecord(ValidationList list)
Performs additional validations on this record.
|
static DBClass |
findClassForTable(java.lang.String tableName)
short hand method to find the class for the table name.
|
ExternalDataSource |
findExternalDataSource(java.lang.String... args)
external data source.
|
ExternalMode |
findExternalMode(java.lang.String... args)
external mode.
|
DBClassAbstract |
findTemplate(java.lang.String... args)
The template for this class.
|
java.lang.reflect.Method |
getArchiveDataLoaderMethod()
INTERNAL: The archive data loader method
|
java.util.HashMap |
getClassMap()
get the class map
|
java.lang.reflect.Method |
getDataLoaderMethod()
INTERNAL: The data loader method
|
DBField[] |
getDBFieldOnChangeList(DBField field)
The on change list
|
java.lang.String |
getDuplicateWarningFields(java.lang.String... args) |
int |
getEstimatedMemorySize(java.lang.String... args) |
ExternalDataSource |
getExternalDataSource(java.lang.String... args) |
java.lang.String |
getExternalManagerClass(java.lang.String... args) |
ExternalMode |
getExternalMode(java.lang.String... args) |
java.lang.String |
getExternalTable(java.lang.String... args) |
java.lang.reflect.Constructor |
getJavaClassConstructor()
The constructor for this class.
|
DBField[] |
getKeywordFields()
The list of key word fields.
|
java.util.Date |
getLastObjModifiedTime()
Returns the last time an object of this class was modified
|
DBField[] |
getLinkedFields()
The list of linked fields.
|
int |
getLoadSequence(java.lang.String... args) |
java.lang.String |
getRecentLinksPrimer(java.lang.String... args) |
DBClass |
getRootDBClass()
The root class.
|
GlobalKey |
getRootGlobalKey()
The root class's global key.
|
RootClassHolder |
getRootHolder()
INTERNAL: The root holder for this class.
|
GlobalKeyId |
getRootId()
The root class's global Id.
|
DBClass[] |
getSubClasses()
Retrieve a list of classes that are direct sub classes of this class
GLOBAL - to get the dbClass child list we need to pass in the current virtualDB
|
DBClass[] |
getSubClassesAll()
Retrieve a list of all descendent sub classes
|
java.lang.String |
getTableExt()
Returns the table name extension based on the current database and the
root class id based on the class id of this class
for e.g.
|
DBClassAbstract |
getTemplate(java.lang.String... args) |
DBClassSyncMap[] |
getTransactionSystemMap()
Retrieve a list of the sync map records.
|
boolean |
hasArrayField()
does this class a array field.
|
boolean |
isAbstract()
Is this DBClass marked as abstract
|
boolean |
isAbstractFg(java.lang.String... args) |
boolean |
isDropCacheWhenRemotelyChanged(java.lang.String... args) |
boolean |
isGenerateGWT(java.lang.String... args)
Deprecated.
|
boolean |
isIgnoreJournalData(java.lang.String... args) |
boolean |
isIndexJournalData(java.lang.String... args) |
boolean |
isLayerExcluded(int dbId)
Is the specified layer excluded for this class
|
boolean |
isNoChangesInLayer(java.lang.String... args) |
boolean |
isRecordNoIntialData(java.lang.String... args) |
boolean |
isRecordNoJournalData(java.lang.String... args) |
boolean |
isRecordNoJournalRecord(java.lang.String... args) |
DBStoredResult[] |
listDBStoredResult()
Retrieve a list of the sync map records.
|
java.lang.String |
makeClassSQLClause(java.lang.String alias)
make the SQL clause for the sub classes
|
java.lang.String |
makeClassSQLClauseLeftJoin()
make the SQL clause for the sub classes
|
RootClassHolder |
makeRootHolder()
INTERNAL: make a root holder
|
static GlobalKeyId |
makeRootId(GlobalId classId)
The root class id
|
DBClass |
setAbstractFg(boolean value,
java.lang.String... args) |
DBClass |
setDisableFieldRecycler(boolean value,
java.lang.String... args) |
DBClass |
setDropCacheWhenRemotelyChanged(boolean value,
java.lang.String... args) |
DBClass |
setDuplicateWarningFields(java.lang.String value,
java.lang.String... args) |
DBClass |
setEstimatedMemorySize(int value,
java.lang.String... args) |
DBClass |
setExternalDataSource(com.aspc.dal.dbobj.internal.dal.obj.ExternalDataSource value,
java.lang.String... args) |
DBClass |
setExternalManagerClass(java.lang.String value,
java.lang.String... args) |
DBClass |
setExternalMode(com.aspc.dal.dbobj.internal.dal.obj.ExternalMode value,
java.lang.String... args) |
DBClass |
setExternalTable(java.lang.String value,
java.lang.String... args) |
DBClass |
setGenerateGWT(boolean value,
java.lang.String... args)
Deprecated.
|
DBClass |
setIgnoreJournalData(boolean value,
java.lang.String... args) |
DBClass |
setIndexJournalData(boolean value,
java.lang.String... args) |
void |
setLastObjModifiedTime(java.util.Date modifiedTime)
record the last time this class has been modified since the server started.
|
DBClass |
setLoadSequence(int value,
java.lang.String... args) |
DBClass |
setRecentLinksPrimer(java.lang.String value,
java.lang.String... args) |
DBClass |
setRecordNoIntialData(boolean value,
java.lang.String... args) |
DBClass |
setRecordNoJournalData(boolean value,
java.lang.String... args) |
DBClass |
setRecordNoJournalRecord(boolean value,
java.lang.String... args) |
DBClass |
setTemplate(com.aspc.dal.dbobj.DBClassAbstract value,
java.lang.String... args) |
java.lang.String |
toString()
The full name of this DB class
|
checkDependances, findEmbeddedLinkage, findParentGid, findRootClass, getACLList, getDBEventListAll, getDBField, getDBField, getDBFieldList, getDBFieldListAll, getDBFieldListAllSorted, getDBModuleList, getDBModuleListAll, getDefaultRestFields, getEmbeddedLinkage, getEventList, getExcludedLayersList, getExcludedLayersListAll, getInwardLinks, getJavaClass, getJavaClassName, getKeyField, getParentDBClassConcrete, getParentGid, getParentGlobalKey, getRootClass, getRootClassConcrete, getSearchPlanMethod, isBase, isInModule, isInstanceOf, isInstanceOf, isStaticList, makeRowId, setDefaultRestFields, setEmbeddedLinkage, setParentGid, setStaticList
eventDependantAdded, eventDependantRemoved, eventReload, fetchInterfaceFields, fetchTemplateFields, findDBField, findKey, getClassId, getClassList, getDeprecatedTx, getDescription, getDisplayName, getFullName, getName, getNameForDisplay, getNotes, hasDBField, hasDBField, hasInterfaces, isDeprecated, isFinalFg, makeQuery, setClassId, setDeprecated, setDeprecatedTx, setDescription, setDisplayName, setFinalFg, setHasInterfaces, setJavaClassName, setName, setNotes
addReloadEventListener, archiveCheck, autoEnterCreate, calculateValue, calculateValue, calculateValue, callingRestoreByJournal, changeThreadMode, checkCreateAccess, checkDelete, checkDeleteAccess, checkModifyAccess, checkModifyAccess, checkReadAccess, copy, copyFields, copyIncludeField, copyInwardLinks, delete, denormalizedResult, displayLogName, displayValue, doSearch, dump, equals, eventDataLoaded, extAutoEnterCreate, extCheckCreateAccess, extCheckDeleteAccess, extCheckModifyAccess, extCheckModifyAccess, extCheckReadAccess, extCopy, extDelete, extDeleteRecord, extGetValue, extIsMandatory, extIsOnChange, extMarkSavePoint, extPreDeleteRecord, extPreSaveRecord, extPreValidateDelete, extRaiseEvents, extRollbackTo, extSaveRecord, extSetValue, extUndelete, extValidateDelete, fetchLinkHolder, findGlobalKey, findGlobalKey, findGlobalKey, findGlobalKey, findLinkedObject, findLinkedObject, findLinkedObject, findRawData, fireEventDataLoaded, fixUp, forceLockedTransaction, getBoolean, getBoolean, getBoolean, getBoolean, getBoolean, getBoolean, getChangedFieldInfo, getChangedFields, getDate, getDate, getDate, getDate, getDate, getDefaultValue, getDisableOnChangeEvent, getDouble, getDouble, getDouble, getDouble, getDouble, getFieldDouble, getFieldInt, getFieldLong, getFieldString, getFormattedString, getFormattedString, getGlobalKey, getGlobalKey, getGlobalKey, getGlobalKey, getGlobalKey, getInt, getInt, getInt, getInt, getInt, getInt, getInwardLinkage, getKeyString, getKeyValue, getLinkedObject, getLinkedObject, getLinkedObject, getLinkedObjectByKey, getLinkedRowId, getLinkedRowId, getLinkedRowIdByData, getLinkHolder, getLockedTransaction, getLong, getLong, getLong, getLong, getLong, getLong, getMutableArrayValue, getMutableArrayValue, getOriginalKey, getOriginalValue, getOriginalValue, getProcessedValue, getPureValue, getRawData, getRawValue, getRawValue, getRowId, getRowKey, getSecondaryCacheGroupKey, getSrcLayerID, getString, getString, getString, getString, getString, getString, getValue, getValue, getValue, getValue, hasAutoChanged, hasAutoChanged, hasChanged, hasChangedByUser, hasChangedByUserField, hasChangedByUserField, hasFieldChanged, hasFieldChanged, hashCode, hasStoredResult, iCheckDeleteAccess, iCheckModifyAccess, iCheckReadAccess, iGetDenormalizedMap, iGetRawValue, iPlaceDenormalizedResult, iPostSaveOrDeleteRecord, iPreSaveOrDeleteRecord, iPreValidate, iRaiseEvents, iSaveOrDeleteRecord, isBrokenLink, isBrokenLink, isChanged, isDataCacheKnownToBeDirty, isDeleted, isEmpty, iSetValue, isForceReindex, isKeyWordField, isMandatory, isNew, isNull, isNull, isOnChange, isReindex, iValidateRecord, lastTouched, makeArchiveDataLoader, makeClone, makeDataLoader, makeDenormalizedDoc, makeLinkedArray, makeModifyAccessException, makeSearchPlan, makeWriteProvider, manualDenormalizeOnSave, markSavePoint, optLockedTransaction, registerWatchedObject, reindex, releaseDenormalized, removeReloadEventListener, restoreByJournal, rollbackTo, setBoolean, setBoolean, setBoolean, setBoolean, setDisableOnChangeEvent, setDouble, setDouble, setInt, setInt, setLong, setLong, setRawData, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, touch, undelete, validateField, validateRecord, validateSubType
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
registerWatchedObject
public static final java.lang.String DBCLASS_NAME
public static final GlobalId DBCLASS_GID
protected DBClassSyncMap[][] holderDBClassSyncMap
protected DBStoredResult[][] holderDBStoredResult
public DBClass(@Nonnull DBClass dbClass, @Nonnull DataSource dataSource) throws java.lang.Exception
dbClass
- The raw classdataSource
- The datasource for this objectjava.lang.Exception
- A serious problem occurredprotected DBClass(@Nonnull DataSource dataSource) throws java.lang.Exception
dataSource
- The data source for this objectjava.lang.Exception
- A serious problem@CheckReturnValue public boolean isAbstractFg(java.lang.String... args)
@Nonnull public DBClass setAbstractFg(boolean value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public boolean disableFieldRecycler(java.lang.String... args)
@Nonnull public DBClass setDisableFieldRecycler(boolean value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public boolean isDropCacheWhenRemotelyChanged(java.lang.String... args)
@Nonnull public DBClass setDropCacheWhenRemotelyChanged(boolean value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getDuplicateWarningFields(java.lang.String... args)
@Nonnull public DBClass setDuplicateWarningFields(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public int getEstimatedMemorySize(java.lang.String... args)
@Nonnull public DBClass setEstimatedMemorySize(int value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public ExternalDataSource getExternalDataSource(java.lang.String... args)
@CheckReturnValue @Nonnull public final ExternalDataSource findExternalDataSource(java.lang.String... args) throws NotFoundException
ExternalDataSource
(String, Searchable)args
- the optional argumentsNotFoundException
- ExternalDataSource was not found@Nonnull public DBClass setExternalDataSource(com.aspc.dal.dbobj.internal.dal.obj.ExternalDataSource value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getExternalManagerClass(java.lang.String... args)
@Nonnull public DBClass setExternalManagerClass(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public ExternalMode getExternalMode(java.lang.String... args)
@CheckReturnValue @Nonnull public final ExternalMode findExternalMode(java.lang.String... args) throws NotFoundException
ExternalMode
(String, Searchable)args
- the optional argumentsNotFoundException
- ExternalMode was not found@Nonnull public DBClass setExternalMode(com.aspc.dal.dbobj.internal.dal.obj.ExternalMode value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String getExternalTable(java.lang.String... args)
@Nonnull public DBClass setExternalTable(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@Deprecated @CheckReturnValue public boolean isGenerateGWT(java.lang.String... args)
@Deprecated @Nonnull public DBClass setGenerateGWT(boolean value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public boolean isIgnoreJournalData(java.lang.String... args)
@Nonnull public DBClass setIgnoreJournalData(boolean value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public boolean isIndexJournalData(java.lang.String... args)
@Nonnull public DBClass setIndexJournalData(boolean value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public int getLoadSequence(java.lang.String... args)
@Nonnull public DBClass setLoadSequence(int value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public boolean isNoChangesInLayer(java.lang.String... args)
@CheckReturnValue @Nonnull public java.lang.String getRecentLinksPrimer(java.lang.String... args)
@Nonnull public DBClass setRecentLinksPrimer(java.lang.String value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public boolean isRecordNoIntialData(java.lang.String... args)
@Nonnull public DBClass setRecordNoIntialData(boolean value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public boolean isRecordNoJournalData(java.lang.String... args)
@Nonnull public DBClass setRecordNoJournalData(boolean value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue public boolean isRecordNoJournalRecord(java.lang.String... args)
@Nonnull public DBClass setRecordNoJournalRecord(boolean value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nullable public DBClassAbstract getTemplate(java.lang.String... args)
@CheckReturnValue @Nonnull public final DBClassAbstract findTemplate(java.lang.String... args) throws NotFoundException
DBClassAbstract
(Integer, Searchable)args
- the optional argumentsNotFoundException
- DBClassAbstract was not found@Nonnull public DBClass setTemplate(com.aspc.dal.dbobj.DBClassAbstract value, java.lang.String... args) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.reflect.Method getDataLoaderMethod() throws java.lang.Exception
java.lang.Exception
- A serious problem@CheckReturnValue @Nonnull public java.lang.reflect.Method getArchiveDataLoaderMethod() throws java.lang.Exception
java.lang.Exception
- A serious problem@CheckReturnValue public boolean hasArrayField() throws java.lang.Exception
java.lang.Exception
- a serious problem.public final void extPreValidate() throws java.lang.Exception
extPreValidate
in class DBClassAbstract
java.lang.Exception
- A serious problem@OverridingMethodsMustInvokeSuper protected void extFixUp() throws java.lang.Exception
extFixUp
in class DBClassAbstract
java.lang.Exception
- A serious problem@CheckReturnValue @Nullable protected final java.lang.Object extGetDerivedValue(@Nonnull DBField field, @Nullable FldParams params) throws java.lang.Exception
extGetDerivedValue
in class DBClassConcrete
params
- The field arguments.field
- The field to getjava.lang.Exception
- A serious problem@OverridingMethodsMustInvokeSuper protected void extValidateRecord(@Nonnull ValidationList list) throws java.lang.Exception
extValidateRecord
in class DBClassAbstract
list
- The validation list.java.lang.Exception
- A serious problem@CheckReturnValue @Nonnull public java.lang.String makeClassSQLClause(@Nullable java.lang.String alias)
alias
- the table alias@CheckReturnValue @Nonnull public java.lang.String makeClassSQLClauseLeftJoin()
public void checkFullList(long rowUID)
rowUID
- The row that must be in the full list of row ids.@CheckReturnValue @Nullable public RootClassHolder getRootHolder()
public void clearRootHolder()
@CheckReturnValue @Nonnull public RootClassHolder makeRootHolder() throws java.lang.InterruptedException
java.lang.InterruptedException
- was interrupted.@CheckReturnValue @Nonnull public DBObject createDBObject(@Nonnull DataSource userDS) throws java.lang.Exception
userDS
- The datasource to create the object for.java.lang.Exception
- A serious problem.@OverridingMethodsMustInvokeSuper protected void eventFieldUpdated(@Nonnull DBField field, @Nullable java.lang.Object previous, @Nullable GlobalKey previousKey, @Nullable FldParams params) throws java.lang.Exception
eventFieldUpdated
in class DBObject
field
- The field updated.previous
- The previous value for this field.previousKey
- The previous keyparams
- The parameters usedjava.lang.Exception
- a serious problem@OverridingMethodsMustInvokeSuper protected void extPostSaveRecord(@Nonnegative long transNr)
extPostSaveRecord
in class DBObject
transNr
- The current transaction number.@CheckReturnValue @Nonnull public final DBField[] getLinkedFields()
@CheckReturnValue @Nonnull public final DBField[] getKeywordFields()
@CheckReturnValue @Nonnull public final java.lang.reflect.Constructor getJavaClassConstructor() throws java.lang.Exception
java.lang.Exception
- A serious problem@CheckReturnValue @Nonnull public final java.lang.String getTableExt()
@CheckReturnValue @Nonnull public static DBClass findClassForTable(java.lang.String tableName) throws NotFoundException
tableName
- the table nameNotFoundException
- if no class found or invalid table name.@CheckReturnValue @Nonnull public final DBField[] getDBFieldOnChangeList(@Nonnull DBField field)
field
- The field that is changing@CheckReturnValue @Nonnull public java.lang.String toString()
toString
in class DBClassConcrete
@CheckReturnValue @Nonnull public DBClass[] getSubClasses() throws java.lang.Exception
java.lang.Exception
- A serious problem@CheckReturnValue @Nonnull public DBClassSyncMap[] getTransactionSystemMap() throws java.lang.Exception
java.lang.Exception
- A serious problem@CheckReturnValue @Nonnull public DBStoredResult[] listDBStoredResult() throws java.lang.Exception
java.lang.Exception
- A serious problem@CheckReturnValue @Nonnull public DBClass[] getSubClassesAll() throws java.lang.Exception
java.lang.Exception
- A serious problem@CheckReturnValue public final boolean isAbstract()
isAbstract
in class DBClassConcrete
@CheckReturnValue @Nonnull public GlobalKey getRootGlobalKey()
@CheckReturnValue @Nonnull public final DBClass getRootDBClass()
@CheckReturnValue @Nonnull public final GlobalKeyId getRootId()
@CheckReturnValue @Nullable public static GlobalKeyId makeRootId(@Nullable GlobalId classId)
classId
- The class id to check.@CheckReturnValue @Nonnull public java.lang.String displayName()
displayName
in class DBObject
@CheckReturnValue public final boolean isLayerExcluded(int dbId)
dbId
- The layer id@CheckReturnValue @Nonnull public java.util.Date getLastObjModifiedTime()
public void setLastObjModifiedTime(@Nonnull java.util.Date modifiedTime)
modifiedTime
- The time.@CheckReturnValue @Nullable protected GlobalKey extGetDerivedGlobalKey(@Nonnull DBField field, @Nullable FldParams params) throws java.lang.Exception
extGetDerivedGlobalKey
in class DBObject
field
- The field to getparams
- The parameters for this field eg. language= or default=java.lang.Exception
- A serious problem@OverridingMethodsMustInvokeSuper protected void extPostDeleteRecord(@Nonnegative long transNr)
extPostDeleteRecord
in class DBObject
transNr
- The transaction number@OverridingMethodsMustInvokeSuper @CheckReturnValue @Nullable protected final ValidationError extValidateField(@Nonnull DBField field, @Nonnull ValidationList list) throws java.lang.Exception
extValidateField
in class DBClassConcrete
list
- The current validation listfield
- The field to validatejava.lang.Exception
- A serious problem@CheckReturnValue protected final boolean extCanDeleteDependantObject(@Nonnull DBObject o)
extCanDeleteDependantObject
in class DBObject
o
- The object to checkpublic void clearCache()
public void clearCache(@Nullable GlobalKey key)
clearCache
in class DBClassConcrete
key
- The key@CheckReturnValue @Nonnull public java.util.HashMap getClassMap()
stSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.