public abstract class FieldDef extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
capitalisedName |
protected String |
displayLevel |
protected int |
displayOrder |
protected Vector<FieldQualifier> |
fieldQualifiers |
protected int |
lineNumber |
protected String |
name |
protected String |
rawType |
protected String |
searchability |
protected TableDef |
table |
protected String |
typeShortName
short name eg String, User
|
| Constructor and Description |
|---|
FieldDef(int lineNo,
TableDef table,
String name,
String type,
String rawType,
int displayOrder,
Vector<FieldQualifier> qualifiers)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static FieldDef |
from(TableDef table,
StreamTokenizer tokens,
int displayOrder)
Creates the appropriate type of
FieldDef from the input
stream. |
void |
generateBaseMethods(Writer w)
Write out this
Column's base methods. |
void |
generateColAccessor(Writer w)
Write out this
Column's accessors. |
void |
generateColDecl(Writer w)
Write out this
Column's java declaration string. |
void |
generateColDefinition(Writer w)
Write out this
Column's definition using an anonymous
class. |
protected void |
generateColRawAccessors(Writer w)
Write out this
Column's field accessors as part of the
anonymous definition of the Column. |
void |
generateFieldCreator(Writer w)
Write out this
Column's field creators. |
abstract void |
generateJavaDeclaration(Writer w)
Write out this
Field's java declaration string. |
int |
getHeight() |
int |
getWidth() |
boolean |
isCreateable() |
boolean |
isDeletedColumn() |
boolean |
isEditable() |
boolean |
isIndexed() |
boolean |
isNullable() |
boolean |
isSortDescending() |
boolean |
isTroidColumn() |
boolean |
isUnique() |
abstract String |
poemTypeJava() |
void |
setCreateable(boolean isCreateable)
Set the isCreatable property.
|
void |
setDeletedColumn(boolean isDeletedColumn)
Set whether this field represents a deleted marker.
|
void |
setEditable(boolean isEditable)
Set the isEditable property.
|
void |
setHeight(int height)
Set the height property.
|
void |
setIndexed(boolean isIndexed)
Set the isIndexed property.
|
void |
setNullable(boolean isNullable)
Set the nullable property.
|
void |
setSortDescending(boolean sortDescending)
Set the sortDescending property.
|
void |
setTroidColumn(boolean isTroidColumn)
Set the isTroidColumn property.
|
void |
setUnique(boolean isUnique)
Set the isUnique property.
|
void |
setWidth(int width)
Set the width property.
|
String |
toString() |
protected final TableDef table
protected final String name
protected final String capitalisedName
protected int displayOrder
protected final String typeShortName
protected final String rawType
protected final Vector<FieldQualifier> fieldQualifiers
protected String displayLevel
protected String searchability
protected int lineNumber
public FieldDef(int lineNo,
TableDef table,
String name,
String type,
String rawType,
int displayOrder,
Vector<FieldQualifier> qualifiers)
throws org.melati.poem.prepro.IllegalityException
lineNo - the line number in the DSD filetable - the TableDef that this Field is part ofname - the name of this fieldtype - the POEM type of this fieldrawType - the underlying java type of this fielddisplayOrder - where to place this field in a listqualifiers - all the qualifiers to be applied to this fieldIllegalityException - if a semantic inconsistency is detectedpublic String toString()
public static FieldDef from(TableDef table, StreamTokenizer tokens, int displayOrder) throws org.melati.poem.prepro.ParsingDSDException, IOException, org.melati.poem.prepro.IllegalityException
FieldDef from the input
stream.table - the TableDef we are dealing withtokens - the StreamTokenizer to get tokens fromdisplayOrder - the ranking of this FieldFieldDef of the appropriate typeParsingDSDException - if an unexpected token is encounteredIOException - if something goes wrong with the file systemIllegalityException - if a semantic incoherence is detectedpublic void generateBaseMethods(Writer w) throws IOException
Column's base methods.w - Persistent BaseIOException - if something goes wrong with the file systempublic void generateFieldCreator(Writer w) throws IOException
Column's field creators.w - Persistent BaseIOException - if something goes wrong with the file systempublic abstract void generateJavaDeclaration(Writer w) throws IOException
Field's java declaration string.w - PersistentBaseIOException - if something goes wrong with the file systempublic void generateColDecl(Writer w) throws IOException
Column's java declaration string.w - TableBaseIOException - if something goes wrong with the file systempublic void generateColAccessor(Writer w) throws IOException
Column's accessors.w - TableBaseIOException - if something goes wrong with the file systemprotected void generateColRawAccessors(Writer w) throws IOException
Column's field accessors as part of the
anonymous definition of the Column.w - TableBaseIOException - if something goes wrong with the file systempublic void generateColDefinition(Writer w) throws IOException
Column's definition using an anonymous
class.w - TableBaseIOException - if something goes wrong with the file systempublic abstract String poemTypeJava()
PoemType.public boolean isDeletedColumn()
public void setDeletedColumn(boolean isDeletedColumn)
isDeletedColumn - booleanpublic boolean isTroidColumn()
public void setTroidColumn(boolean isTroidColumn)
isTroidColumn - booleanpublic boolean isNullable()
public void setNullable(boolean isNullable)
isNullable - booleanpublic boolean isEditable()
public void setEditable(boolean isEditable)
isEditable - booleanpublic boolean isSortDescending()
public void setSortDescending(boolean sortDescending)
sortDescending - whether to sort in a descending orderpublic boolean isCreateable()
public void setCreateable(boolean isCreateable)
isCreateable - booleanpublic boolean isIndexed()
public void setIndexed(boolean isIndexed)
isIndexed - booleanpublic boolean isUnique()
public void setUnique(boolean isUnique)
isUnique - booleanpublic int getWidth()
public void setWidth(int width)
width - the width to setpublic int getHeight()
public void setHeight(int height)
height - the height to setCopyright © 2000–2015 PanEris. All rights reserved.