|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.melati.poem.Column
public abstract class Column
Abstract Table column which is extended by the generated classes.
| Nested Class Summary | |
|---|---|
static class |
Column.LoadException
Thrown when any unforeseen problem arises loading a Column. |
static class |
Column.SettingException
Thrown when any unforseen problem arises setting the value of a Column. |
| Constructor Summary | |
|---|---|
Column(Table table,
java.lang.String name,
SQLPoemType type,
DefinitionSource definitionSource)
Constructor. |
|
| Method Summary | |
|---|---|
Field |
asEmptyField()
Return a Field of the same type as this Column with default attributes. |
abstract Field |
asField(Persistent g)
Return a Field of the same type as this Column from the Persistent. |
CachedSelection |
cachedSelectionWhereEq(java.lang.Object raw)
Create a new CachedSelection of objects equal to this raw parameter. |
protected java.lang.String |
defaultDescription()
|
protected DisplayLevel |
defaultDisplayLevel()
|
protected java.lang.String |
defaultDisplayName()
|
protected int |
defaultDisplayOrder()
|
protected java.lang.Integer |
defaultDisplayOrderPriority()
|
protected int |
defaultHeight()
|
protected boolean |
defaultIndexed()
|
protected StandardIntegrityFix |
defaultIntegrityFix()
|
protected int |
defaultPrecision()
|
protected java.lang.String |
defaultRenderinfo()
|
protected int |
defaultScale()
|
protected Searchability |
defaultSearchability()
|
protected boolean |
defaultSortDescending()
|
protected boolean |
defaultUnique()
|
protected boolean |
defaultUserCreateable()
|
protected boolean |
defaultUserEditable()
|
protected int |
defaultWidth()
|
void |
dump()
Print information about the structure of the Column to stdout. |
void |
dump(java.io.PrintStream ps)
Print information to PrintStream. |
Persistent |
ensure(Persistent orCreate)
Ensures a row exists for which this column matches when compared with the given Persistent. |
java.lang.String |
eqClause(java.lang.Object raw)
|
int |
firstFree(java.lang.String whereClause)
Find the next free value in an Integer column. |
Persistent |
firstWhereEq(java.lang.Object raw)
Return the first one found or null if not found. |
java.lang.String |
fullQuotedName()
|
ColumnInfo |
getColumnInfo()
|
abstract java.lang.Object |
getCooked(Persistent g)
Retrieves the field value, with locking and access control for this Column. |
Database |
getDatabase()
|
java.lang.String |
getDescription()
|
DisplayLevel |
getDisplayLevel()
|
java.lang.String |
getDisplayName()
Return a human readable name from the metadata. |
java.lang.Integer |
getDisplayOrderPriority()
|
int |
getHeight()
|
boolean |
getIndexed()
|
IntegrityFix |
getIntegrityFix()
Get the IntegrityFix, if any. |
java.lang.String |
getName()
|
abstract java.lang.Object |
getRaw_unsafe(Persistent g)
Retrieves the field value, without locking, for this Column. |
abstract java.lang.Object |
getRaw(Persistent g)
Retrieves the field value, with locking, for this Column. |
java.lang.String |
getRenderInfo()
|
Searchability |
getSearchability()
|
boolean |
getSortDescending()
Defaults to false. |
SQLPoemType |
getSQLType()
|
Table |
getTable()
|
PoemType |
getType()
|
boolean |
getUnique()
|
boolean |
getUserCreateable()
|
boolean |
getUserEditable()
|
int |
getWidth()
|
boolean |
isDeletedColumn()
A Deleted Column is a Column which signal whether the record has been soft-deleted. |
boolean |
isTroidColumn()
|
java.lang.String |
quotedName()
|
java.util.Enumeration |
referencesTo(Persistent object)
Return an Enumeration of Persistents from the
Table this column refers to, if this is a reference column,
otherwise the Empty Enumeration. |
java.util.Enumeration |
selectionWhereEq(java.lang.Object raw)
Get rows where column equal to value. |
abstract void |
setCooked(Persistent g,
java.lang.Object cooked)
Sets the field value, with locking, access control and validation for this Column. |
void |
setDisplayLevel(DisplayLevel level)
|
void |
setIntegrityFix(StandardIntegrityFix fix)
|
abstract void |
setRaw_unsafe(Persistent g,
java.lang.Object raw)
Sets the field value, without locking, for this Column. |
abstract void |
setRaw(Persistent g,
java.lang.Object raw)
Sets the field value, with locking, for this Column. |
void |
setRawString(Persistent g,
java.lang.String rawString)
Set the value from its String representation, if possible. |
void |
setSearchability(Searchability searchability)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Column(Table table,
java.lang.String name,
SQLPoemType type,
DefinitionSource definitionSource)
table - this column belongs toname - of this Columntype - datatypedefinitionSource - where it is being defined from| Method Detail |
|---|
protected DisplayLevel defaultDisplayLevel()
protected Searchability defaultSearchability()
protected java.lang.Integer defaultDisplayOrderPriority()
protected boolean defaultSortDescending()
protected java.lang.String defaultDisplayName()
protected int defaultDisplayOrder()
protected java.lang.String defaultDescription()
protected boolean defaultUserEditable()
protected boolean defaultUserCreateable()
protected boolean defaultIndexed()
protected boolean defaultUnique()
protected StandardIntegrityFix defaultIntegrityFix()
protected int defaultWidth()
protected int defaultHeight()
protected int defaultPrecision()
protected int defaultScale()
protected java.lang.String defaultRenderinfo()
public final Database getDatabase()
public final Table getTable()
public final java.lang.String getName()
getName in interface FieldAttributesFieldAttributes.getName()public final java.lang.String quotedName()
public final java.lang.String fullQuotedName()
public final java.lang.String getDisplayName()
getDisplayName in interface FieldAttributesFieldAttributes.getDisplayName()public final java.lang.String getDescription()
getDescription in interface FieldAttributesFieldAttributes.getDescription()public final ColumnInfo getColumnInfo()
public DisplayLevel getDisplayLevel()
public void setDisplayLevel(DisplayLevel level)
level - the DisplayLevel to setpublic Searchability getSearchability()
public void setSearchability(Searchability searchability)
searchability - the Searchability to setpublic final boolean getUserEditable()
getUserEditable in interface FieldAttributesFieldAttributes.getUserEditable()public final boolean getUserCreateable()
getUserCreateable in interface FieldAttributesFieldAttributes.getUserCreateable()public final SQLPoemType getSQLType()
public final PoemType getType()
getType in interface FieldAttributesFieldAttributes.getType()public final boolean isTroidColumn()
public final boolean isDeletedColumn()
public final boolean getIndexed()
getIndexed in interface FieldAttributesFieldAttributes.getIndexed()public final boolean getUnique()
public IntegrityFix getIntegrityFix()
public void setIntegrityFix(StandardIntegrityFix fix)
fix - the IntegrityFix to setpublic final java.lang.String getRenderInfo()
getRenderInfo in interface FieldAttributesFieldAttributes.getRenderInfo()public final int getWidth()
getWidth in interface FieldAttributesFieldAttributes.getWidth()public final int getHeight()
getHeight in interface FieldAttributesFieldAttributes.getHeight()public final java.lang.Integer getDisplayOrderPriority()
public final boolean getSortDescending()
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public void dump()
public void dump(java.io.PrintStream ps)
ps - PrintStream to dump topublic java.lang.String eqClause(java.lang.Object raw)
raw - An object with an equivalent SQL type
public java.util.Enumeration selectionWhereEq(java.lang.Object raw)
raw - a raw value such as a String
public Persistent firstWhereEq(java.lang.Object raw)
raw - Object of correct type for this Column
public CachedSelection cachedSelectionWhereEq(java.lang.Object raw)
raw - Object of correct type for this Column
public abstract java.lang.Object getRaw(Persistent g)
throws AccessPoemException
Column.
g - the Persistent to read
AccessPoemException - if the current AccessToken
does not confer read access rightspublic abstract java.lang.Object getRaw_unsafe(Persistent g)
Column.
g - the Persistent to read
public abstract void setRaw(Persistent g,
java.lang.Object raw)
throws AccessPoemException,
ValidationPoemException
Column.
g - the Persistent to modifyraw - the value to set the field to
AccessPoemException - if the current AccessToken
does not confer write access rights
ValidationPoemException - if the raw value is not valid
public abstract void setRaw_unsafe(Persistent g,
java.lang.Object raw)
Column.
g - the Persistent to modifyraw - the value to set the field to
public abstract java.lang.Object getCooked(Persistent g)
throws AccessPoemException,
PoemException
Column.
g - the Persistent to modify
AccessPoemException - if the current AccessToken
does not confer read access rights
PoemException - if any problem occurs
public abstract void setCooked(Persistent g,
java.lang.Object cooked)
throws AccessPoemException,
ValidationPoemException
Column.
g - the Persistent to modifycooked - the value to set
AccessPoemException - if the current AccessToken
does not confer read access rights
ValidationPoemException - if the value is not validpublic abstract Field asField(Persistent g)
g - the Persistent
public Field asEmptyField()
public void setRawString(Persistent g,
java.lang.String rawString)
g - the Persistent to alterrawString - the String representation of the value to setpublic java.util.Enumeration referencesTo(Persistent object)
Persistents from the
Table this column refers to, if this is a reference column,
otherwise the Empty Enumeration.
object - A persistent of the type referred to by this column
Persistents referencing this Column of the Persistentpublic Persistent ensure(Persistent orCreate)
Persistent.
The given object is used to create a new row if necessary, in which case it will be assigned the next troid and cached.
orCreate - the Persistent to use as criteria and ensure
public int firstFree(java.lang.String whereClause)
whereClause -
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||