org.modelsphere.jack.baseDb.db
Class DbUDF

java.lang.Object
  extended by PersistentObject
      extended by org.modelsphere.jack.baseDb.db.DbObject
          extended by org.modelsphere.jack.baseDb.db.DbSemanticalObject
              extended by org.modelsphere.jack.baseDb.db.DbUDF

public final class DbUDF
extends DbSemanticalObject

Implements a User-Defined Field. Users may define their other field to any ModelSphere concept. The type of a UDF must be one of the following:

  • UDFValueType.STRING
  • UDFValueType.LONG
  • UDFValueType.DOUBLE
  • UDFValueType.TEXT
  • UDFValueType.BOOLEAN

    The static method DbUDF.getUDF(project, metaClass, udfName) returns the DbUDF object corresponding to the UDF udfName in the class , or null if this UDF is not defined in the project. The two following methods on DbObject, get(dbUDF) and getUDF(udfName), return the UDF value for this object (null if no value). The method set(dbUDF, value) on DbObject sets the UDF value for this object (value may be null).


    Nested Class Summary
    static class DbUDF.UDFMap
               
     
    Nested classes/interfaces inherited from class org.modelsphere.jack.baseDb.db.DbObject
    DbObject.ComponentIterator
     
    Field Summary
    static MetaRelationN fDisplayZones
               
    static MetaField fMetaClassName
               
    static MetaField fValueType
               
    static MetaClass metaClass
               
     
    Fields inherited from class org.modelsphere.jack.baseDb.db.DbSemanticalObject
    fAdminAccessList, fAlias, fDescription, fName, fPhysicalName, fWriteAccessList
     
    Fields inherited from class org.modelsphere.jack.baseDb.db.DbObject
    ACCESS_GRANTED, ACCESS_NOT_GRANTED, fComponents, fComposite, fCreationTime, fModificationTime, fUdfValues, fValidationStatus, LONG_FORM, SHORT_FORM, VALIDATION_ERROR, VALIDATION_OK, VALIDATION_WARNING, writeAccess
     
    Constructor Summary
    DbUDF()
               
    DbUDF(DbProject project, MetaClass metaClass)
               
     
    Method Summary
     DbRelationN getDisplayZones()
               
     MetaClass getMetaClass()
               
     java.lang.String getMetaClassName()
               
     java.lang.String getSemanticalName(int form)
               
    static DbUDF[] getUDF(DbProject project, MetaClass metaClass)
               
    static DbUDF getUDF(DbProject project, MetaClass metaClass, java.lang.String udfName)
               
     MetaClass getUDFMetaClass()
               
     java.lang.Class getValueClass()
               
     UDFValueType getValueType()
               
    static void initMeta()
               
     boolean isAUserPropertyOf(DbObject dbo)
               
     boolean isHugeRelN(MetaRelationN metaRelN)
               
     boolean matches(DbObject dbo)
               
     void set(MetaField metaField, java.lang.Object value)
               
     void setMetaClassName(java.lang.String value)
               
     void setValueType(UDFValueType value)
               
     
    Methods inherited from class org.modelsphere.jack.baseDb.db.DbSemanticalObject
    findComponentByPhysicalName, getAdminAccessList, getAlias, getDescription, getName, getPhysicalName, getWriteAccessList, setAlias, setDescription, setName, setPhysicalName
     
    Methods inherited from class org.modelsphere.jack.baseDb.db.DbObject
    addDbRefreshListener, addDbRefreshListener, basicReinsert, basicSet, basicSet, buildFullNameString, buildFullNameString, componentTree, componentTree, componentTree, copyComponent, createComponent, createComponent, createRAMRelN, deepCopy, deepCopy, doDeleteAction, findComponentByName, findComponentByName, findMatchingObject, generateEDCTimestamp, get, get, get, getAccordingToStatus, getComponents, getComposite, getCompositeOfType, getCreationTime, getDb, getDependencyRelations, getEDCTimestamp, getFullDisplayName, getId, getMatchingObject, getMinCard, getModificationTime, getNbNeighbors, getNextTs, getOld, getProject, getSemanticalIcon, getTransStatus, getTs, getUDF, getUdfValues, getValidationStatus, hasAdminAccess, hasChanged, hasField, hasWriteAccess, isAddedAndRemoved, isAlive, isDeletable, isDescendingFrom, load, load, reinsert, remove, removeDbRefreshListener, save, set, set, setComposite, setMatchingObject, setModificationTime, setRelationNN, setRelationNN, setValidationStatus, toString, valuesAreEqual
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
     

    Field Detail

    fMetaClassName

    public static final MetaField fMetaClassName

    fValueType

    public static final MetaField fValueType

    fDisplayZones

    public static final MetaRelationN fDisplayZones

    metaClass

    public static final MetaClass metaClass
    Constructor Detail

    DbUDF

    public DbUDF()

    DbUDF

    public DbUDF(DbProject project,
                 MetaClass metaClass)
          throws DbException
    Throws:
    DbException
    Method Detail

    initMeta

    public static void initMeta()

    getUDF

    public static DbUDF getUDF(DbProject project,
                               MetaClass metaClass,
                               java.lang.String udfName)
                        throws DbException
    Throws:
    DbException

    getUDF

    public static DbUDF[] getUDF(DbProject project,
                                 MetaClass metaClass)
                          throws DbException
    Throws:
    DbException

    isHugeRelN

    public final boolean isHugeRelN(MetaRelationN metaRelN)
    Overrides:
    isHugeRelN in class DbObject

    getSemanticalName

    public final java.lang.String getSemanticalName(int form)
                                             throws DbException
    Overrides:
    getSemanticalName in class DbObject
    Throws:
    DbException

    getUDFMetaClass

    public final MetaClass getUDFMetaClass()
                                    throws DbException
    Throws:
    DbException

    getValueClass

    public final java.lang.Class getValueClass()
                                        throws DbException
    Throws:
    DbException

    matches

    public final boolean matches(DbObject dbo)
                          throws DbException
    Overrides:
    matches in class DbSemanticalObject
    Throws:
    DbException

    setMetaClassName

    public final void setMetaClassName(java.lang.String value)
                                throws DbException
    Throws:
    DbException

    setValueType

    public final void setValueType(UDFValueType value)
                            throws DbException
    Throws:
    DbException

    set

    public void set(MetaField metaField,
                    java.lang.Object value)
             throws DbException
    Overrides:
    set in class DbSemanticalObject
    Throws:
    DbException

    getMetaClassName

    public final java.lang.String getMetaClassName()
                                            throws DbException
    Throws:
    DbException

    getValueType

    public final UDFValueType getValueType()
                                    throws DbException
    Throws:
    DbException

    getDisplayZones

    public final DbRelationN getDisplayZones()
                                      throws DbException
    Throws:
    DbException

    getMetaClass

    public MetaClass getMetaClass()
    Specified by:
    getMetaClass in class DbObject

    isAUserPropertyOf

    public final boolean isAUserPropertyOf(DbObject dbo)
                                    throws DbException
    Throws:
    DbException


    Open ModelSphere 2007. All Rights Reserved.