|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hydrateframework.gen.schema.SchemaElementBase
org.hydrateframework.gen.schema.Attribute
public class Attribute
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.hydrateframework.gen.schema.Member |
|---|
Member.CollectionType, Member.SpecialColumnType |
| Nested classes/interfaces inherited from interface org.hydrateframework.gen.schema.SchemaElement |
|---|
SchemaElement.HighlightType |
| Field Summary | |
|---|---|
protected int |
forInsert
|
protected int |
forUpdate
|
protected int |
isOptional
|
protected int |
isUnique
|
protected java.lang.String |
name
|
protected Attribute |
overrides
|
protected int |
precision
|
protected int |
scale
|
protected int |
size
|
protected java.lang.String |
sqlName
|
protected java.lang.String |
sqlTypeDef
|
protected java.lang.String |
strType
|
protected java.lang.String |
tableName
|
protected Type |
type
|
| Fields inherited from class org.hydrateframework.gen.schema.SchemaElementBase |
|---|
ATTR_MANDATORY, ATTR_MANDATORYNOOVR, ATTR_NOOVR, ATTR_OPTIONAL, ATTR_OPTIONALNOOVR, BOOL_FALSE, BOOL_NOT, BOOL_NOTSET, BOOL_TRUE, NAME, valid |
| Fields inherited from interface org.hydrateframework.gen.schema.Member |
|---|
INUSE_CLASSDIAGRAM, INUSE_IMPLEMENT, INUSE_INTERFACE, INUSE_NEXT, INUSE_XMLSCHEMA |
| Constructor Summary | |
|---|---|
Attribute(Family family,
Attribute overrides)
|
|
Attribute(Family family,
ClassDef clsDef)
|
|
| Method Summary | |
|---|---|
Member.CollectionType |
collectionType()
The type of collection |
boolean |
equals(java.lang.Object o)
|
Member[] |
explode()
|
Type |
getCollectionOf()
The type of collection |
java.lang.String |
getComment()
A comment that describes the purpose of this member e.g. |
Family |
getFamily()
|
SchemaElement.HighlightType |
getHighlightType()
|
java.lang.String |
getJavaAttrName()
The java name of the attribute. |
java.lang.String |
getJavaEmptyValue()
The string that is the default value for this member in java |
java.lang.String |
getJavaNativeType()
True if this member's type is a java native type |
java.lang.String |
getJavaNotPopulatedValue()
The java constant that indicates that the member is 'not populated' |
java.lang.String |
getJavaNotSetValue()
The java constant that indicates that the member is 'not set'. |
java.lang.String |
getJavaPublicType()
The name of the type as presented in the external interface. |
java.lang.String |
getJavaSqlType()
|
java.lang.String |
getJavaStaticName()
The name of the static variable associated with this field in java. |
java.lang.String |
getJavaTypeName()
The name of the type in Java. |
java.lang.String |
getJavaVarName()
The java name of the member. |
int |
getLength()
Return the length of the member. |
java.lang.String |
getName()
The name of the member. |
SchemaElementBase |
getOverrides()
|
int |
getPrecision()
Return the precision of the member. |
ClassDef |
getReferencingClassDef()
|
int |
getScale()
Return the precision of the member. |
Member.SpecialColumnType |
getSpecialColumnType()
True if this is an invisible field (such as an automatically generated primary key) |
java.lang.String |
getSQLTypeName(SQLWriter sqlWriter)
|
java.lang.String |
getTypeName()
The type name of the member. |
java.lang.String |
getXSDTypeName()
|
int |
hashCode()
|
boolean |
isEnumeration()
|
boolean |
isInUse(int inContext)
true if this member is currently important to the dataset being used |
boolean |
isNavigable()
Only valid if isReference is true. |
boolean |
isOptional()
True if this is an optional member (may take the not set value) |
boolean |
isOwned()
True if this member is owned, or has is lifecycle encapsulated by the referencing object |
boolean |
isPersistent()
False if this is a transient field that is never stored in the database |
boolean |
isReference()
True if this member is a reference to another hydrate object |
boolean |
isSupressedLink()
true if this is a suppressed link that is not to be stored in the database |
boolean |
isToManyRef()
Only valid if isReference is true. |
boolean |
isValid(java.lang.StringBuffer reason)
Determine if the schema element just read is valid. |
void |
notifyUpdate(SchemaElement element)
Notify a schema element that the schema element it is overriding has changed |
SchemaElement |
override(Family family)
Override the schema element from ain included file. |
protected void |
readAttrs(java.util.Stack<java.lang.String> readContext,
org.w3c.dom.Element elem)
Read in all attributes that may be overridden |
boolean |
readFromXmlDoc(java.util.Stack<java.lang.String> readContext,
org.w3c.dom.Element elem)
Read the element from the DOM model |
void |
resolve()
|
protected void |
setComment(java.lang.String cmt)
|
void |
setLength(int len)
|
void |
setName(java.lang.String nm)
|
void |
setPrecision(int prec)
|
protected void |
setType(java.lang.String typeNm)
|
boolean |
shouldWrite()
|
java.lang.String |
toString()
|
java.lang.String |
toSummary()
|
java.lang.String |
writeAsString(java.lang.String obj)
|
protected void |
writeAttrs(java.util.List<SAXWriter.Attr> attrs)
|
java.lang.String |
writeCompareTwo(java.lang.String one,
java.lang.String two)
|
java.lang.String |
writeCvtFromJavaObj(java.lang.String obj)
|
java.lang.String |
writeCvtInternalToPublic(java.lang.String var)
Write code that will convert the internal representation of a variable into the public representation. |
java.lang.String |
writeCvtPublicToInternal(java.lang.String var)
Write code that will convert the public representation of a variable into the internal representation. |
java.lang.String |
writeFromString(java.lang.String obj)
|
java.lang.String |
writeHashCode(java.lang.String var)
|
java.lang.String |
writeJavaKeyField(java.lang.String varName)
|
java.lang.String |
writeJavaSqlRead(java.lang.String rs,
java.lang.String mbrIdx)
|
java.lang.String |
writeJavaSqlSet(java.lang.String stmt,
java.lang.String mbrIdx,
java.lang.String mbrVar)
|
java.lang.String |
writeJavaSqlUpdate(java.lang.String rs,
java.lang.String mbrIdx,
java.lang.String mbrVar)
|
void |
writeToXmlDoc(SAXWriter wrt)
Write out this schema element to the SAX Handler |
java.lang.String |
writeUpdFromUnderlying(java.lang.String var)
|
void |
writeXSDType(SAXWriter wrt)
|
| Methods inherited from class org.hydrateframework.gen.schema.SchemaElementBase |
|---|
addBoolAttribute, addEnumAttribute, addIntAttribute, addListAttribute, addStringAttribute, isValidIdentifier, newElement, printAttrWarning, printWarning, readBoolAttribute, readEnumAttribute, readIntAttribute, readListAttribute, readStringAttribute, refEquals, supersedes |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String name
protected int isOptional
protected int isUnique
protected int forUpdate
protected int forInsert
protected java.lang.String sqlTypeDef
protected java.lang.String sqlName
protected java.lang.String tableName
protected int size
protected int precision
protected int scale
protected java.lang.String strType
protected Type type
protected Attribute overrides
| Constructor Detail |
|---|
public Attribute(Family family,
Attribute overrides)
public Attribute(Family family,
ClassDef clsDef)
| Method Detail |
|---|
public SchemaElementBase getOverrides()
getOverrides in class SchemaElementBasepublic java.lang.String toSummary()
toSummary in interface SchemaElementpublic java.lang.String getName()
Member
getName in interface MembergetName in interface SchemaElementpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic void setLength(int len)
public void setPrecision(int prec)
protected void setComment(java.lang.String cmt)
protected void setType(java.lang.String typeNm)
public ClassDef getReferencingClassDef()
getReferencingClassDef in interface Memberpublic java.lang.String getJavaStaticName()
Member
getJavaStaticName in interface Memberpublic java.lang.String getJavaAttrName()
Member
getJavaAttrName in interface Memberpublic java.lang.String getJavaVarName()
Member
getJavaVarName in interface Memberpublic java.lang.String getComment()
Member
getComment in interface Memberpublic int getLength()
Member
getLength in interface Memberpublic int getPrecision()
Member
getPrecision in interface Memberpublic int getScale()
Member
getScale in interface Memberpublic boolean isOwned()
Member
isOwned in interface Memberpublic boolean isPersistent()
Member
isPersistent in interface Memberpublic boolean isOptional()
Member
isOptional in interface Memberpublic boolean isInUse(int inContext)
Member
isInUse in interface Memberpublic boolean isReference()
Member
isReference in interface Memberpublic boolean isNavigable()
Member
isNavigable in interface Memberpublic boolean isToManyRef()
Member
isToManyRef in interface Memberpublic Member.CollectionType collectionType()
Member
collectionType in interface Memberpublic Type getCollectionOf()
Member
getCollectionOf in interface Memberpublic Member.SpecialColumnType getSpecialColumnType()
Member
getSpecialColumnType in interface Memberpublic java.lang.String getTypeName()
Member
getTypeName in interface Memberpublic java.lang.String getJavaTypeName()
Member
getJavaTypeName in interface Memberpublic java.lang.String getJavaPublicType()
Member
getJavaPublicType in interface Memberpublic java.lang.String getJavaNotSetValue()
Member
getJavaNotSetValue in interface Memberpublic java.lang.String getJavaNotPopulatedValue()
Member
getJavaNotPopulatedValue in interface Memberpublic java.lang.String getJavaNativeType()
Member
getJavaNativeType in interface Memberpublic java.lang.String getJavaEmptyValue()
Member
getJavaEmptyValue in interface Memberpublic java.lang.String getJavaSqlType()
getJavaSqlType in interface Memberpublic boolean isSupressedLink()
Member
isSupressedLink in interface Member
public java.lang.String writeJavaSqlUpdate(java.lang.String rs,
java.lang.String mbrIdx,
java.lang.String mbrVar)
writeJavaSqlUpdate in interface Member
public java.lang.String writeJavaSqlRead(java.lang.String rs,
java.lang.String mbrIdx)
writeJavaSqlRead in interface Memberpublic java.lang.String writeCvtFromJavaObj(java.lang.String obj)
writeCvtFromJavaObj in interface Memberpublic java.lang.String writeCvtInternalToPublic(java.lang.String var)
Member
writeCvtInternalToPublic in interface Memberpublic java.lang.String writeCvtPublicToInternal(java.lang.String var)
Member
writeCvtPublicToInternal in interface Memberprotected void writeAttrs(java.util.List<SAXWriter.Attr> attrs)
public void writeToXmlDoc(SAXWriter wrt)
throws org.xml.sax.SAXException
SchemaElement
writeToXmlDoc in interface SchemaElementorg.xml.sax.SAXException
protected void readAttrs(java.util.Stack<java.lang.String> readContext,
org.w3c.dom.Element elem)
readContext - elem -
public boolean readFromXmlDoc(java.util.Stack<java.lang.String> readContext,
org.w3c.dom.Element elem)
SchemaElement
readFromXmlDoc in interface SchemaElementreadContext - the context within the XML of the read operation. This is used
to help pinpoint the source of an error.elem - the DOM element to use to initialize this class.public void resolve()
resolve in interface SchemaElementpublic Member[] explode()
explode in interface Memberpublic void setName(java.lang.String nm)
public java.lang.String writeAsString(java.lang.String obj)
writeAsString in interface Memberpublic java.lang.String writeFromString(java.lang.String obj)
writeFromString in interface Memberpublic java.lang.String writeJavaKeyField(java.lang.String varName)
writeJavaKeyField in interface Memberpublic java.lang.String getSQLTypeName(SQLWriter sqlWriter)
getSQLTypeName in interface Member
public java.lang.String writeJavaSqlSet(java.lang.String stmt,
java.lang.String mbrIdx,
java.lang.String mbrVar)
writeJavaSqlSet in interface Memberpublic java.lang.String writeHashCode(java.lang.String var)
writeHashCode in interface Memberpublic java.lang.String writeUpdFromUnderlying(java.lang.String var)
writeUpdFromUnderlying in interface Memberpublic java.lang.String getXSDTypeName()
getXSDTypeName in interface Member
public void writeXSDType(SAXWriter wrt)
throws org.xml.sax.SAXException
writeXSDType in interface Memberorg.xml.sax.SAXException
public java.lang.String writeCompareTwo(java.lang.String one,
java.lang.String two)
writeCompareTwo in interface Memberpublic boolean isValid(java.lang.StringBuffer reason)
SchemaElement
isValid in interface SchemaElementreason - the reason for the failure (or warning) if any should be appended to this string buffer.
public void notifyUpdate(SchemaElement element)
SchemaElement
notifyUpdate in interface SchemaElementelement - the overridden schema element.public boolean shouldWrite()
shouldWrite in interface SchemaElementpublic SchemaElement override(Family family)
SchemaElementSchemaElement.notifyUpdate(SchemaElement) method when this element changes.
override in interface SchemaElementfamily - the family in which the overridden element is to be created
public Family getFamily()
public SchemaElement.HighlightType getHighlightType()
getHighlightType in interface SchemaElementpublic boolean isEnumeration()
isEnumeration in interface Member
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||