|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.melati.poem.prepro.FieldDef
public abstract class FieldDef
An abstract definition of a Field from which all other FieldDefs are derived.
Field Summary | |
---|---|
protected String |
displayLevel
|
protected int |
displayOrder
|
protected int |
lineNumber
|
protected String |
name
|
protected Vector |
qualifiers
|
protected String |
rawType
|
protected String |
searchability
|
protected String |
suffix
|
protected TableDef |
table
|
protected String |
type
|
Constructor Summary | |
---|---|
FieldDef(int lineNo,
TableDef table,
String name,
String type,
String rawType,
int displayOrder,
Vector qualifiers)
Constructor. |
Method Summary | |
---|---|
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 heigth 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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final TableDef table
protected final String name
protected final String suffix
protected int displayOrder
protected final String type
protected final String rawType
protected final Vector qualifiers
protected String displayLevel
protected String searchability
protected int lineNumber
Constructor Detail |
---|
public FieldDef(int lineNo, TableDef table, String name, String type, String rawType, int displayOrder, Vector qualifiers) throws org.melati.poem.prepro.IllegalityException
table
- 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 field
IllegalityException
- if a semantic inconsistency is detectedMethod Detail |
---|
public String toString()
toString
in class Object
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 Field
FieldDef
of the appropriate type
ParsingDSDException
- if an unexpected token is encountered
IOException
- if something goes wrong with the file system
IllegalityException
- if a semantic incoherence is detectedpublic void generateBaseMethods(Writer w) throws IOException
Column
's base methods.
w
- Persistent Base
IOException
- if something goes wrong with the file systempublic void generateFieldCreator(Writer w) throws IOException
Column
's field creators.
w
- Persistent Base
IOException
- if something goes wrong with the file systempublic abstract void generateJavaDeclaration(Writer w) throws IOException
Field
's java declaration string.
w
- PersistentBase
IOException
- if something goes wrong with the file systempublic void generateColDecl(Writer w) throws IOException
Column
's java declaration string.
w
- TableBase
IOException
- if something goes wrong with the file systempublic void generateColAccessor(Writer w) throws IOException
Column
's accessors.
w
- TableBase
IOException
- 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
- TableBase
IOException
- if something goes wrong with the file systempublic void generateColDefinition(Writer w) throws IOException
Column
's definition using an anonymous
class.
w
- TableBase
IOException
- 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
- public 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 set
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |