|
Keel 2.1RC2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This object contains the "definition" of a Persistent, all of the Meta-data that associates it with a particular database table. Each persistent has a name, which is assigned arbitrarily (but uniquely) within it's "schema". This name is used to refer to the Persistent within Model objects. Each field in the persistent likewise has a name, which may or may not be the same as the field name in the actual database. This allows the field names to be altered for compatibility with a particular database by changing only the configuration file, not the application. The same is true of table names.
| Field Summary | |
static java.lang.String |
ROLE |
| Method Summary | |
boolean |
allowsNull(java.lang.String fieldName)Determine if the specified field may contain null. |
boolean |
collectStatistics()Return true if we are collecting Bean statistics for this Persistent. |
void |
configurePersistent(Configuration newConfig)This is configuration for the underlying Persistent |
java.lang.Object |
getAttribute(java.lang.String fieldName, java.lang.String attribName)Get a named "attribute" of this field from the setup meta-data for the Persistent. |
java.util.Map |
getAttributes(java.lang.String fieldName)Return any special additional attributes configured for the specified field. |
AuthorizationManager |
getAuthManager()If securable, then each peristent can have it's own authorization manager |
int |
getCacheSize()Get the size of the cache (in elements) used for this Persistent. |
java.lang.String |
getCharset()Return the current object's character set |
java.lang.String |
getClassName()A particular persistent may be implemented by a specified class, in which case an instance of this class is created when a "create" on this persistent is called |
java.lang.String |
getDatabaseName(java.lang.String fieldName)Get the name of the field in the actual database, that is, the name to be used in constructing SQL statement to refer to this field. |
DatabaseType |
getDatabaseType()Return the name of the DatabaseType implementation configured for this Persistent. |
DataSourceComponent |
getDataSource()Return the DataSourceComponent used for this Persistent. |
java.lang.String |
getDBFieldName(java.lang.String fieldName)Get the name of this field as it is stored in the database (the column name), actually used in SQL. |
java.lang.String |
getDBType(java.lang.String fieldName)Retrieve the database storage type of the specified field. |
java.lang.String |
getDefaultValue(java.lang.String fieldName)Get the (read-only) configured default value for the named field, if one was specified. |
java.lang.String |
getDescription()Return a description of this Persistent. |
java.lang.String |
getDescription(java.lang.String fieldName)Return the description of a field |
java.util.Set |
getDetailNames()Return a set of relation names, where each relation is a "detail" relationship between this persistent and another. |
PersistentFactory |
getFactory()Return the current PersistentFactory |
java.util.Set |
getFieldNames()Get a set of all of the fields in this object. |
java.lang.String |
getFilterMethod(java.lang.String fieldName)Return the name of the Filter implementation to be applied to the specified field, if any. |
java.lang.String |
getHelperClassName()Get the name of the class defined as a "Helper" for this Persistent, if any. |
IdGenerator |
getIdGenerator(java.lang.String fieldName)Return the IdGenerator instance configured for a particular field, if any. |
java.util.Set |
getIndexedFields(java.lang.String indexName)Return the set of field names indexed by the named index. |
java.util.Set |
getIndicies()Return an Set of the names of each of the indicies defined on this table on this table |
java.util.Set |
getKeyFieldNames()Get a list of all of the names of the key fields in this object |
int |
getLength(java.lang.String fieldName)Return the maximum length of the specified field, if any maximum is configured. |
java.util.Map |
getListValidValues(java.lang.String fieldName)Returns a map of Valid values (id/description pairs). |
java.lang.String |
getLookupField(java.lang.String fieldName)Added by Santanu Dutt Get a field to use in lookup object |
java.lang.String |
getLookupFieldDisplay(java.lang.String fieldName)Added by Santanu Dutt Get a display field to use in lookup object |
java.lang.String |
getLookupObject(java.lang.String fieldName)Get a field's lookup object - this is the name of another Persistent that can be used to look up valid values for this object. |
java.lang.String |
getName()Get the name of this object |
int |
getPageSize()If the Persistent has been defined as having a specific "page size" (for display in listings), return the specified size. |
org.apache.oro.text.regex.Pattern |
getPattern(java.lang.String fieldName)Return the valid expression pattern (pre-compiled) for the named field, if any. |
int |
getPrecision(java.lang.String fieldName)Return the precision of the specified field, if any precision is configured. |
Relation |
getRelation(java.lang.String relationName)Get a specific Relation object which describes a relationship involving this persistent |
java.util.Set |
getRelationNames()Get the set of all Relation names associated with this persistent. |
java.lang.String |
getSchemaName()Return the Schema name for this Persistent. |
java.util.Map |
getStaticValidValues(java.lang.String fieldName)Return a map of declared valid values configured for the named field. |
java.lang.String |
getTableName()The name of the actual table (if a relational database) that stores this Persistent. |
java.lang.String |
getType(java.lang.String fieldName)Return the name of the Java type of a field - this is the "internal" type of this field, not the type for the database |
boolean |
hasField(java.lang.String fieldName)This method will return a boolean true if the field is defined in the Persistent false otherwise. |
boolean |
hasListValidValues(java.lang.String fieldName)Checks to make sure that the fieldName is valid, and then checks to make sure that a listValidValues name has been specified for this object (it is not null). |
boolean |
isAuthManagerBypassAllowed()Some securable persistents that are also used by the DBAuthorizationManager to check authoriztion, need to be able to bypass auth. |
boolean |
isAutoIncremented(java.lang.String fieldName)Determine if a specified field is automatically incremented in value as records are added. |
boolean |
isEncrypted(java.lang.String fieldName)Determine if the specified field is stored in an encrypted format. |
boolean |
isHidden(java.lang.String fieldName)Is a given field 'hidden' - these fields are not shown when a list is produced by the generic crud model. |
boolean |
isKeyField(java.lang.String fieldName)Determine if the specified field participates in the primary key for this Persistent. |
boolean |
isMultiValued(java.lang.String fieldName)Method called to determine if a particular field is multi-valued, that is does it have a set of specific values and descriptions |
boolean |
isReadOnly(java.lang.String fieldName)Is a given field readOnly - these fields are not offered for entry when a form is produced by the crud model. |
boolean |
isRowSecurable() |
boolean |
isSecurable()Determine if the Persistent objects specified by this Meta-data are Securable. |
void |
setDatabaseType(DatabaseType newType)Specify the DatabaseType implementation used for this Persistent. |
void |
setDataSource(DataSourceComponent newSource)The Persistent factory (only) hands this PersistentMetaData it's data source component, which it passes on as needed to the Persistent objects themselves. |
void |
setFactory(PersistentFactory myFactory)Specify the PersistentFactory used to create instances of this Persistent. |
void |
setSchemaName(java.lang.String newName)Specify the schema name for this Persistent. |
| Field Detail |
public static final java.lang.String ROLE
| Method Detail |
public java.lang.String getDefaultValue(java.lang.String fieldName)
throws PersistenceException
fieldName - Name of the field to retrieve the default for.PersistenceException - If there is no such field.public java.util.Set getDetailNames()
public Relation getRelation(java.lang.String relationName)
public java.util.Set getRelationNames()
public boolean allowsNull(java.lang.String fieldName)
throws PersistenceException
PersistenceException - If there is no such field in this persistent
public java.lang.Object getAttribute(java.lang.String fieldName,
java.lang.String attribName)
throws PersistenceException
fieldName - Name of the field to retrieve the attribute value for.attribName - Name of the attribute to retrieve.PersistenceException - If there is no such field, or no such attribute.public java.lang.String getCharset()
public java.lang.String getDescription()
public java.lang.String getDescription(java.lang.String fieldName)
throws PersistenceException
fieldName - The name of the fieldPersistenceException - If there is no such fieldpublic java.util.Set getFieldNames()
PersistenceException - If the list cannot be retrieved
public java.lang.String getDatabaseName(java.lang.String fieldName)
throws PersistenceException
fieldName - The "internal" name for this fieldPersistenceExceptionpublic java.util.Set getKeyFieldNames()
public boolean isKeyField(java.lang.String fieldName)
fieldName - The name of the field
public int getLength(java.lang.String fieldName)
throws PersistenceException
PersistenceException - If no such field exists
public int getPrecision(java.lang.String fieldName)
throws PersistenceException
fieldName - The field requestedPersistenceException - If the field does not exist in this Persistent
public java.lang.String getLookupObject(java.lang.String fieldName)
throws PersistenceException
fieldName - The name of the fieldPersistenceException - If the specified field does not exist.
public java.lang.String getLookupField(java.lang.String fieldName)
throws PersistenceException
fieldName - The field namePersistenceException - If the specified field does not exist.
public java.lang.String getLookupFieldDisplay(java.lang.String fieldName)
throws PersistenceException
fieldName -PersistenceException - If the specified field does not exist.public java.lang.String getName()
public java.lang.String getTableName()
public java.lang.String getType(java.lang.String fieldName)
throws PersistenceException
fieldName - The name of the fieldPersistenceException - If there is no such field in this object
public java.lang.String getDBType(java.lang.String fieldName)
throws PersistenceException
fieldName - Field namePersistenceException - If there is no such fieldpublic java.util.Set getIndicies()
public java.util.Set getIndexedFields(java.lang.String indexName)
throws PersistenceException
PersistenceException - If there is no index with the given namepublic boolean hasField(java.lang.String fieldName)
fieldName - Name of the field to be tested for
public boolean isMultiValued(java.lang.String fieldName)
throws PersistenceException
fieldName - Name of the fieldPersistenceException - If there is no such field
public boolean isReadOnly(java.lang.String fieldName)
throws PersistenceException
fieldName -PersistenceException - Ff there is no such field
public boolean isHidden(java.lang.String fieldName)
throws PersistenceException
fieldName - The name of the field to checkPersistenceException - If there is no such field.public java.lang.String getSchemaName()
public void setSchemaName(java.lang.String newName)
throws PersistenceException
PersistenceException
public void configurePersistent(Configuration newConfig)
throws PersistenceException
PersistenceExceptionpublic void setDatabaseType(DatabaseType newType)
newType - The DatabaseType implementation used for this Persistent.
public IdGenerator getIdGenerator(java.lang.String fieldName)
throws PersistenceException
fieldName - The field name.PersistenceException - If there is no such field name.public DatabaseType getDatabaseType()
public boolean collectStatistics()
public int getCacheSize()
public java.lang.String getHelperClassName()
public boolean isAutoIncremented(java.lang.String fieldName)
throws PersistenceException
fieldName - The name of the field.PersistenceException - If there is no such field.
public java.lang.String getDBFieldName(java.lang.String fieldName)
throws PersistenceException
PersistenceException - If there is no such field
public org.apache.oro.text.regex.Pattern getPattern(java.lang.String fieldName)
throws PersistenceException
PersistenceException - If there is no such field
public boolean hasListValidValues(java.lang.String fieldName)
throws PersistenceException
fieldName -PersistenceException - If there is no such field
public java.util.Map getListValidValues(java.lang.String fieldName)
throws PersistenceException
fieldName -PersistenceException
public java.lang.String getFilterMethod(java.lang.String fieldName)
throws PersistenceException
fieldName - The field namePersistenceException - If there is no such field.
public boolean isEncrypted(java.lang.String fieldName)
throws PersistenceException
fieldName - Field name to checkPersistenceException - If there is no such field.
public void setDataSource(DataSourceComponent newSource)
throws PersistenceException
PersistenceExceptionpublic DataSourceComponent getDataSource()
public int getPageSize()
public java.util.Map getAttributes(java.lang.String fieldName)
throws PersistenceException
fieldName - The name of the field to retrieve the Attribute map for.PersistenceException
public java.util.Map getStaticValidValues(java.lang.String fieldName)
throws PersistenceException
PersistenceExceptionpublic java.lang.String getClassName()
public void setFactory(PersistentFactory myFactory)
myFactory - The PersistentFactory used to create these Persistent objects.public PersistentFactory getFactory()
public boolean isSecurable()
public boolean isRowSecurable()
public AuthorizationManager getAuthManager()
public boolean isAuthManagerBypassAllowed()
|
Keel 2.1RC2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||