|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jaffa.persistence.engines.jdbcengine.configservice.ClassMetaData
This class holds all the meta deta pertaining to a particular persistent object
| Constructor Summary | |
ClassMetaData()
Constructs a new ClassMetaData object with an empty class name. |
|
ClassMetaData(String classname)
Constructs a new ClassMetaData object with the specified class name. |
|
| Method Summary | |
void |
addAttribute(String attName,
String type)
Add an attribute to this meta data object. |
void |
addKeyField(String attName,
String type,
boolean autogen)
Add a primary key field attribute to this meta data object. |
void |
addMember(String attName,
String memberName)
Add a member for an attribute to this meta object. |
void |
addSqlName(String attName,
String sqlName)
Add a new sql name for an attribute to this meta object. |
void |
addSqlType(String attName,
String type)
Add sql type data for a particular attribute in this meta data object. |
AccessibleObject |
getAccessor(String attributeName)
Returns the accessor Field/Method for the specified attribute. |
Map |
getAccessors()
Return a Map of the accessor Field/Method objects for the defined class where key is the name of the attribute and value is the accessor Field/Method object. |
Map |
getAllKeyFieldNames()
Returns a Map where key is the name of a primary key attribute for the class and value is its corresponding Java type. |
Map |
getAttributes()
Returns a Map of the non-primary-key attributes of the class where key is the name of the attribtue and value is its Java type. |
String |
getClassName()
Returns the fully-qualified class name of the class that this meta object represents. |
AccessibleObject |
getMutator(String attributeName)
Returns the mutator Field/Method for the specified attribute. |
Map |
getMutators()
Return a Map of the mutator Field/Method objects for the defined class where key is the name of the attribute and value is the mutator Field/Method object. |
Map |
getNonAutoKeyFieldNames()
Returns a Map where key is the name of a primary key attribute for the class and value is its corresponding Java type. |
String |
getSqlName(String attributeName)
Returns the name of the sql column in which the specified attribute is stored, as defined in the mapping file. |
String |
getSqlType(String attributeName)
Returns the database sql type for the specified attribute, as defined in the mapping file. |
String |
getTable()
Return the database table name that the object represented by this meta object is to be stored in. |
String |
getType(String attName)
Returns the Java type of the specified attribute. |
URL |
getXmlFileUrl()
Returns the URL object that was parsed to obtain the meta data for this object. |
void |
setClassName(String classname)
Set the classname property of this meta data object. |
void |
setTable(String table)
Set the table property of this meta data object |
void |
setXmlFileUrl(URL xmlFileUrl)
Set the xmlFileUrl property of this meta data object. |
void |
validate()
Uses the Introspection service to ensure that the correct accessors and mutators exist for each attribtue specified in the mapping file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ClassMetaData()
public ClassMetaData(String classname)
classname - The fully-qualified classname of the class this meta object is to represent.| Method Detail |
public void setXmlFileUrl(URL xmlFileUrl)
xmlFileUrl - The File object used to describe this persistent object.public void setClassName(String classname)
classname - The fully qualified class name of the class this meta
object represents.public void setTable(String table)
table - The database table name used to store this object
public void addKeyField(String attName,
String type,
boolean autogen)
attName - The name of the primary key attribute to be added.type - The Java type of the primary key attribute.autogen - Indicates if the key will be auto-generated.
public void addAttribute(String attName,
String type)
attName - The attribute to be added.type - The Java type of the attribute to be added.
public void addSqlName(String attName,
String sqlName)
attName - The name of the attribute for which the sql name is to be added.sqlName - The sql name of the attribute.
public void addSqlType(String attName,
String type)
attName - The name of the attribute for which sql type is to be added.type - The sql type for the attribute.
public void addMember(String attName,
String memberName)
attName - The name of the attribute for which the member is to be added.memberName - The name of the member variable.public void validate()
public URL getXmlFileUrl()
public String getClassName()
public String getTable()
public Map getAllKeyFieldNames()
Since 1.3 - This include both manual and auto genrated key fields, use getNonAutoKeyFieldNames() to get just the manual key fields.
public Map getNonAutoKeyFieldNames()
public Map getAttributes()
public String getType(String attName)
attName - The name of the attribute to be checked.
public String getSqlName(String attributeName)
attributeName - Name of the attribute for which the sql name is required.
public String getSqlType(String attributeName)
attributeName - Name of the attribute for which sql type is required.
public Map getAccessors()
public AccessibleObject getAccessor(String attributeName)
attributeName - Name of the attribute for which accessor is required.
public Map getMutators()
public AccessibleObject getMutator(String attributeName)
attributeName - Name of the attribute for which mutator is required.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||