org.modelsphere.jack.baseDb.db
Class DbObject
java.lang.Object
PersistentObject
org.modelsphere.jack.baseDb.db.DbObject
- Direct Known Subclasses:
- DbBEContextCell, DbBEQualifierLink, DbBEUseCaseResource, DbIBMContainerClause, DbIBMContainerItem, DbIBMExceptClause, DbINFFragment, DbJVImport, DbLogin, DbLoginNode, DbORAllowableValue, DbORFKeyColumn, DbRoot, DbSemanticalObject, DbSMSDiagram, DbSMSGraphicalObject, DbSMSIndexKey, DbSMSInheritance, DbSMSNotation, DbSMSObjectImport, DbSMSStyle, DbUDFValue, DbZoneDisplay
public abstract class DbObject
- extends PersistentObject
The superclass of all the generated model classes. It defines generic accessors
get()
and set()
. Generic accessors require a MetaField parameter.
Specific accessors (getXXX()
and setXXX()
for a metafield named XXX)
support Java Beans naming conventions, and are generated by genmeta.
The generic getter and specific getters invoke the basicGet()
and then converts, if
applicable, the data from a SrType to the application type. Client code does not directly call
the basicGet()
method.
The generic setter and specific setters invoke one of the three basic methods:
basicSet()
, setRelationNN()
or basicReinsert()
. Client
code does not directly call these methods. Specific setters may perform any required validations
or propagations, then calls basicGet()
.
Method Summary |
void |
addDbRefreshListener(DbRefreshListener listener)
|
void |
addDbRefreshListener(DbRefreshListener listener,
int when)
|
protected void |
basicReinsert(MetaRelationN relation,
int oldIndex,
int newIndex)
|
protected boolean |
basicSet(MetaField metaField,
java.lang.Object value)
|
protected boolean |
basicSet(MetaField metaField,
java.lang.Object value,
int index)
|
java.lang.String |
buildFullNameString()
|
java.lang.String |
buildFullNameString(DbObject.ComponentIterator compIter)
|
DbEnumeration |
componentTree(MetaClass metaClass)
|
DbEnumeration |
componentTree(MetaClass metaClass,
boolean[] compositeAncestors,
MetaClass[] bounds)
|
DbEnumeration |
componentTree(MetaClass metaClass,
MetaClass[] bounds)
|
DbObject |
copyComponent()
Create a copy of DbObject |
DbObject |
createComponent(MetaClass metaClass)
|
DbObject |
createComponent(MetaClass metaClass,
java.lang.Object[] parameters,
java.lang.Class[] parametersClasses)
|
DbRelationN |
createRAMRelN(MetaRelationN metaRelN)
|
static DbObject[] |
deepCopy(DbObject[] dbos,
DbObject composite,
DeepCopyCustomizer customizer)
|
static DbObject[] |
deepCopy(DbObject[] dbos,
DbObject composite,
DeepCopyCustomizer customizer,
boolean namePrefixedWithCopyOf)
|
void |
doDeleteAction()
|
DbObject |
findComponentByName(MetaClass metaClass,
java.lang.String name)
|
DbObject |
findComponentByName(MetaClass metaClass,
java.lang.String name,
boolean caseSentitive)
|
DbObject |
findMatchingObject()
|
static java.lang.String |
generateEDCTimestamp()
|
java.lang.Object |
get(DbUDF udf)
|
java.lang.Object |
get(MetaField metaField)
|
java.lang.Object |
get(MetaField metaField,
int which)
|
java.lang.Object |
getAccordingToStatus(MetaField metaField)
|
DbRelationN |
getComponents()
|
DbObject |
getComposite()
|
DbObject |
getCompositeOfType(MetaClass metaClass)
|
java.lang.Object |
getCreationTime()
|
Db |
getDb()
|
MetaRelation1[] |
getDependencyRelations()
|
java.lang.String |
getEDCTimestamp()
|
java.lang.String |
getFullDisplayName()
|
java.lang.String |
getId()
|
DbObject |
getMatchingObject()
|
abstract MetaClass |
getMetaClass()
|
int |
getMinCard(MetaRelationship metaRel)
|
java.lang.Object |
getModificationTime()
|
java.lang.String |
getName()
|
int |
getNbNeighbors(MetaRelationship relation)
|
static int |
getNextTs()
|
java.lang.Object |
getOld(MetaField metaField)
|
DbProject |
getProject()
|
javax.swing.Icon |
getSemanticalIcon(int form)
|
java.lang.String |
getSemanticalName(int form)
|
int |
getTransStatus()
|
int |
getTs()
|
java.lang.Object |
getUDF(java.lang.String udfName)
|
DbRelationN |
getUdfValues()
|
int |
getValidationStatus()
|
boolean |
hasAdminAccess()
|
boolean |
hasChanged(MetaField metaField)
|
boolean |
hasField(MetaField metaField)
|
boolean |
hasWriteAccess()
|
static void |
initMeta()
|
boolean |
isAddedAndRemoved()
|
boolean |
isAlive()
|
boolean |
isDeletable()
|
boolean |
isDescendingFrom(DbObject dbo)
|
boolean |
isHugeRelN(MetaRelationN metaRelN)
|
DbObject |
load(java.io.ObjectInputStream in,
VersionConverter converter)
|
DbObject |
load(java.io.ObjectInputStream in,
VersionConverter converter,
boolean isRestore)
|
boolean |
matches(DbObject dbo)
|
void |
reinsert(MetaRelationN relation,
int oldIndex,
int newIndex)
|
void |
remove()
|
void |
removeDbRefreshListener(DbRefreshListener listener)
|
void |
save(java.io.ObjectOutputStream out)
|
void |
set(DbUDF udf,
java.lang.Object value)
|
void |
set(MetaField metaField,
java.lang.Object value)
|
void |
set(MetaRelationN relation,
DbObject neighbor,
int op)
|
void |
setComposite(DbObject value)
|
void |
setMatchingObject(DbObject dbo)
|
void |
setModificationTime(java.lang.Long value)
|
void |
setName(java.lang.String name)
|
protected boolean |
setRelationNN(MetaRelationN relation,
DbObject dbo,
int op)
|
protected boolean |
setRelationNN(MetaRelationN relation,
DbObject dbo,
int op,
int index,
int oppositeIndex)
|
void |
setValidationStatus(int value)
|
java.lang.String |
toString()
|
static boolean |
valuesAreEqual(java.lang.Object val1,
java.lang.Object val2)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SHORT_FORM
public static final int SHORT_FORM
- See Also:
- Constant Field Values
LONG_FORM
public static final int LONG_FORM
- See Also:
- Constant Field Values
ACCESS_GRANTED
protected static final byte ACCESS_GRANTED
- See Also:
- Constant Field Values
ACCESS_NOT_GRANTED
protected static final byte ACCESS_NOT_GRANTED
- See Also:
- Constant Field Values
writeAccess
protected transient byte writeAccess
VALIDATION_OK
public static final int VALIDATION_OK
- See Also:
- Constant Field Values
VALIDATION_WARNING
public static final int VALIDATION_WARNING
- See Also:
- Constant Field Values
VALIDATION_ERROR
public static final int VALIDATION_ERROR
- See Also:
- Constant Field Values
fComposite
public static final MetaRelation1 fComposite
fComponents
public static final MetaRelationN fComponents
fUdfValues
public static final MetaRelationN fUdfValues
fCreationTime
public static final MetaField fCreationTime
fModificationTime
public static final MetaField fModificationTime
fValidationStatus
public static final MetaField fValidationStatus
metaClass
public static final MetaClass metaClass
DbObject
public DbObject()
DbObject
public DbObject(DbObject composite)
throws DbException
- Throws:
DbException
initMeta
public static void initMeta()
valuesAreEqual
public static boolean valuesAreEqual(java.lang.Object val1,
java.lang.Object val2)
getNextTs
public static int getNextTs()
getMetaClass
public abstract MetaClass getMetaClass()
toString
public java.lang.String toString()
getFullDisplayName
public java.lang.String getFullDisplayName()
throws DbException
- Throws:
DbException
getSemanticalName
public java.lang.String getSemanticalName(int form)
throws DbException
- Throws:
DbException
buildFullNameString
public final java.lang.String buildFullNameString()
throws DbException
- Throws:
DbException
buildFullNameString
public final java.lang.String buildFullNameString(DbObject.ComponentIterator compIter)
throws DbException
- Throws:
DbException
getSemanticalIcon
public javax.swing.Icon getSemanticalIcon(int form)
throws DbException
- Throws:
DbException
getMinCard
public int getMinCard(MetaRelationship metaRel)
throws DbException
- Throws:
DbException
isHugeRelN
public boolean isHugeRelN(MetaRelationN metaRelN)
createRAMRelN
public final DbRelationN createRAMRelN(MetaRelationN metaRelN)
createComponent
public final DbObject createComponent(MetaClass metaClass)
throws DbException
- Throws:
DbException
createComponent
public final DbObject createComponent(MetaClass metaClass,
java.lang.Object[] parameters,
java.lang.Class[] parametersClasses)
throws DbException
- Throws:
DbException
getDb
public final Db getDb()
getProject
public final DbProject getProject()
getTs
public final int getTs()
throws DbException
- Throws:
DbException
getTransStatus
public final int getTransStatus()
isAddedAndRemoved
public final boolean isAddedAndRemoved()
isAlive
public final boolean isAlive()
throws DbException
- Throws:
DbException
getCompositeOfType
public final DbObject getCompositeOfType(MetaClass metaClass)
throws DbException
- Throws:
DbException
isDescendingFrom
public final boolean isDescendingFrom(DbObject dbo)
throws DbException
- Throws:
DbException
findComponentByName
public final DbObject findComponentByName(MetaClass metaClass,
java.lang.String name)
throws DbException
- Throws:
DbException
findComponentByName
public final DbObject findComponentByName(MetaClass metaClass,
java.lang.String name,
boolean caseSentitive)
throws DbException
- Throws:
DbException
getName
public java.lang.String getName()
throws DbException
- Throws:
DbException
setName
public void setName(java.lang.String name)
throws DbException
- Throws:
DbException
getId
public final java.lang.String getId()
throws DbException
- Throws:
DbException
isDeletable
public boolean isDeletable()
throws DbException
- Throws:
DbException
doDeleteAction
public void doDeleteAction()
throws DbException
- Throws:
DbException
hasField
public final boolean hasField(MetaField metaField)
get
public final java.lang.Object get(DbUDF udf)
throws DbException
- Throws:
DbException
getUDF
public final java.lang.Object getUDF(java.lang.String udfName)
throws DbException
- Throws:
DbException
get
public final java.lang.Object get(MetaField metaField)
throws DbException
- Throws:
DbException
get
public final java.lang.Object get(MetaField metaField,
int which)
throws DbException
- Throws:
DbException
getOld
public final java.lang.Object getOld(MetaField metaField)
throws DbException
- Throws:
DbException
getAccordingToStatus
public final java.lang.Object getAccordingToStatus(MetaField metaField)
throws DbException
- Throws:
DbException
hasChanged
public final boolean hasChanged(MetaField metaField)
throws DbException
- Throws:
DbException
getNbNeighbors
public final int getNbNeighbors(MetaRelationship relation)
throws DbException
- Throws:
DbException
set
public void set(MetaField metaField,
java.lang.Object value)
throws DbException
- Throws:
DbException
set
public void set(MetaRelationN relation,
DbObject neighbor,
int op)
throws DbException
- Throws:
DbException
set
public final void set(DbUDF udf,
java.lang.Object value)
throws DbException
- Throws:
DbException
reinsert
public void reinsert(MetaRelationN relation,
int oldIndex,
int newIndex)
throws DbException
- Throws:
DbException
remove
public void remove()
throws DbException
- Throws:
DbException
deepCopy
public static DbObject[] deepCopy(DbObject[] dbos,
DbObject composite,
DeepCopyCustomizer customizer)
throws DbException
- Throws:
DbException
deepCopy
public static DbObject[] deepCopy(DbObject[] dbos,
DbObject composite,
DeepCopyCustomizer customizer,
boolean namePrefixedWithCopyOf)
throws DbException
- Throws:
DbException
save
public final void save(java.io.ObjectOutputStream out)
throws DbException,
java.io.IOException
- Throws:
DbException
java.io.IOException
load
public final DbObject load(java.io.ObjectInputStream in,
VersionConverter converter)
throws DbException,
java.io.IOException,
java.lang.ClassNotFoundException
- Throws:
DbException
java.io.IOException
java.lang.ClassNotFoundException
load
public final DbObject load(java.io.ObjectInputStream in,
VersionConverter converter,
boolean isRestore)
throws DbException,
java.io.IOException,
java.lang.ClassNotFoundException
- Throws:
DbException
java.io.IOException
java.lang.ClassNotFoundException
componentTree
public final DbEnumeration componentTree(MetaClass metaClass)
throws DbException
- Throws:
DbException
componentTree
public final DbEnumeration componentTree(MetaClass metaClass,
MetaClass[] bounds)
throws DbException
- Throws:
DbException
componentTree
public final DbEnumeration componentTree(MetaClass metaClass,
boolean[] compositeAncestors,
MetaClass[] bounds)
throws DbException
- Throws:
DbException
getComposite
public final DbObject getComposite()
throws DbException
- Throws:
DbException
setComposite
public final void setComposite(DbObject value)
throws DbException
- Throws:
DbException
getCreationTime
public final java.lang.Object getCreationTime()
throws DbException
- Throws:
DbException
getEDCTimestamp
public final java.lang.String getEDCTimestamp()
throws DbException
- Throws:
DbException
generateEDCTimestamp
public static final java.lang.String generateEDCTimestamp()
throws DbException
- Throws:
DbException
getModificationTime
public final java.lang.Object getModificationTime()
throws DbException
- Throws:
DbException
setModificationTime
public final void setModificationTime(java.lang.Long value)
throws DbException
- Throws:
DbException
getValidationStatus
public final int getValidationStatus()
throws DbException
- Throws:
DbException
setValidationStatus
public final void setValidationStatus(int value)
throws DbException
- Throws:
DbException
getComponents
public final DbRelationN getComponents()
throws DbException
- Throws:
DbException
getUdfValues
public final DbRelationN getUdfValues()
throws DbException
- Throws:
DbException
hasWriteAccess
public boolean hasWriteAccess()
throws DbException
- Throws:
DbException
hasAdminAccess
public boolean hasAdminAccess()
throws DbException
- Throws:
DbException
basicSet
protected final boolean basicSet(MetaField metaField,
java.lang.Object value)
throws DbException
- Throws:
DbException
basicSet
protected final boolean basicSet(MetaField metaField,
java.lang.Object value,
int index)
throws DbException
- Throws:
DbException
setRelationNN
protected final boolean setRelationNN(MetaRelationN relation,
DbObject dbo,
int op)
throws DbException
- Throws:
DbException
setRelationNN
protected final boolean setRelationNN(MetaRelationN relation,
DbObject dbo,
int op,
int index,
int oppositeIndex)
throws DbException
- Throws:
DbException
basicReinsert
protected final void basicReinsert(MetaRelationN relation,
int oldIndex,
int newIndex)
throws DbException
- Throws:
DbException
setMatchingObject
public final void setMatchingObject(DbObject dbo)
getMatchingObject
public final DbObject getMatchingObject()
findMatchingObject
public final DbObject findMatchingObject()
throws DbException
- Throws:
DbException
getDependencyRelations
public MetaRelation1[] getDependencyRelations()
matches
public boolean matches(DbObject dbo)
throws DbException
- Throws:
DbException
addDbRefreshListener
public final void addDbRefreshListener(DbRefreshListener listener)
addDbRefreshListener
public final void addDbRefreshListener(DbRefreshListener listener,
int when)
removeDbRefreshListener
public final void removeDbRefreshListener(DbRefreshListener listener)
copyComponent
public DbObject copyComponent()
throws DbException
- Create a copy of DbObject
- Throws:
DbException
Open ModelSphere 2007. All Rights Reserved.