Package com.storedobject.core
Class ClassAttribute<T extends StoredObject>
java.lang.Object
com.storedobject.core.ClassAttribute<T>
- Type Parameters:
T
- Class type.
Class attribute of a
StoredObject
class contains metadata information about the class that is not
applicable to normal Java classes. Many of the metadata information is used for determining the behaviour of the
object instances when displayed it on the screen, stored in the database etc.- Author:
- Syam
-
Method Summary
Modifier and TypeMethodDescriptionMethod[]
Get the "file" methods of this.static ClassAttribute
<?> get
(int family) Get the class attribute instance for the given family (eachStoredObject
class has a unique family code).static <O extends StoredObject>
ClassAttribute<O> Get the class attribute instance for the given object class.static <O extends StoredObject>
ClassAttribute<O> get
(O object) Get the class attribute instance for the given object instance.Get all attributes that can be used by end-developers (for reporting/displaying etc.)Get anchors defined for this.Get the list of attributes.Get extra fields of this.int
getFieldMetadata
(String fieldName) Get the UI field metadata for a given attribute name.getFieldMetadata
(String fieldName, boolean external) Get the UI field metadata for a given attribute name.Get the "form layout" information of this.int
Get the "form style" of this.Get the "get" method for the given attribute.Get the module name.Class of this.Get the parent of this.Get the table name.getTitle()
Get the "title" of this.int
howBig
(boolean any) Get an indication about how big this database table is.listChildClasses
(boolean fullTree) Get the list of child classes of this.static String
moduleName
(Class<? extends StoredObject> objectClass) Get the "set" method for the given attribute.static String
tableName
(Class<? extends StoredObject> objectClass) boolean
writeAllowed
(String attributeName) Whether write is allowed for the given attribute or not.
-
Method Details
-
writeAllowed
Whether write is allowed for the given attribute or not.- Parameters:
attributeName
- Name of the attribute.- Returns:
- True/false.
-
getFieldMetadata
Get the UI field metadata for a given attribute name.- Parameters:
fieldName
- Name of the attribute.- Returns:
- UI field metadata.
-
getFieldMetadata
Get the UI field metadata for a given attribute name.- Parameters:
fieldName
- Name of the attribute.external
- True for considering externally defined metadata.- Returns:
- UI field metadata.
-
getAllAttributes
-
getMethod
-
setMethod
-
fileMethods
Get the "file" methods of this. File methods are those "get" methods that returnStreamData
orFileData
instances.- Returns:
- Array of file methods.
-
getAttributes
-
getModuleName
-
getTableName
-
getObjectClass
-
listChildClasses
-
getExtraInfo
-
getParent
Get the parent of this.- Returns:
- Parent if nay. Otherwise, null is returned.
-
getFormStyle
public int getFormStyle()Get the "form style" of this. For internal use only.- Returns:
- Form style.
-
getTitle
-
getFormLayout
Get the "form layout" information of this. For internal use only.- Returns:
- Form layout information.
-
getExtraFields
Get extra fields of this. For internal use only.- Returns:
- List of extra fields.
-
howBig
public int howBig(boolean any) Get an indication about how big this database table is. For internal use only.- Parameters:
any
- Whether to check the subclasses or not.- Returns:
- Hint about how big the database table is.
-
getAnchors
-
get
Get the class attribute instance for the given family (eachStoredObject
class has a unique family code).- Parameters:
family
- Family of the class.- Returns:
- Class attribute instance or null if it doesn't exit.
-
get
Get the class attribute instance for the given object instance.- Parameters:
object
- Object instance.- Returns:
- Class attribute instance or null if it doesn't exit.
-
get
Get the class attribute instance for the given object class.- Parameters:
objectClass
- Object class.- Returns:
- Class attribute instance or null if it doesn't exit.
-
tableName
-
moduleName
-
getFamily
public int getFamily()
-