|
||||||||||
| 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,
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(Object raw)
Create a new CachedSelection of objects equal to this raw parameter. |
protected String |
defaultDescription()
|
protected DisplayLevel |
defaultDisplayLevel()
|
protected String |
defaultDisplayName()
|
protected int |
defaultDisplayOrder()
|
protected Integer |
defaultDisplayOrderPriority()
|
protected int |
defaultHeight()
|
protected boolean |
defaultIndexed()
|
protected StandardIntegrityFix |
defaultIntegrityFix()
|
protected int |
defaultPrecision()
|
protected 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(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. |
String |
eqClause(Object raw)
|
int |
firstFree(String whereClause)
Find the next free value in an Integer column. |
Persistent |
firstWhereEq(Object raw)
Return the first one found or null if not found. |
String |
fullQuotedName()
|
ColumnInfo |
getColumnInfo()
|
abstract Object |
getCooked(Persistent g)
Retrieves the field value, with locking and access control for this Column. |
Database |
getDatabase()
|
String |
getDescription()
|
DisplayLevel |
getDisplayLevel()
|
String |
getDisplayName()
Return a human readable name from the metadata. |
Integer |
getDisplayOrderPriority()
|
int |
getHeight()
|
boolean |
getIndexed()
|
IntegrityFix |
getIntegrityFix()
Get the IntegrityFix, if any. |
String |
getName()
|
abstract Object |
getRaw_unsafe(Persistent g)
Retrieves the field value, without locking, for this Column. |
abstract Object |
getRaw(Persistent g)
Retrieves the field value, with locking, for this Column. |
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()
|
String |
quotedName()
|
Enumeration<Persistent> |
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. |
Enumeration<Persistent> |
selectionWhereEq(Object raw)
Get rows where column equal to value. |
abstract void |
setCooked(Persistent g,
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,
Object raw)
Sets the field value, without locking, for this Column. |
abstract void |
setRaw(Persistent g,
Object raw)
Sets the field value, with locking, for this Column. |
void |
setRawString(Persistent g,
String rawString)
Set the value from its String representation, if possible. |
void |
setSearchability(Searchability searchability)
|
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,
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 Integer defaultDisplayOrderPriority()
protected boolean defaultSortDescending()
protected String defaultDisplayName()
protected int defaultDisplayOrder()
protected 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 String defaultRenderinfo()
public final Database getDatabase()
public final Table getTable()
public final String getName()
getName in interface FieldAttributesFieldAttributes.getName()public final String quotedName()
public final String fullQuotedName()
public final String getDisplayName()
getDisplayName in interface FieldAttributesFieldAttributes.getDisplayName()public final 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 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 Integer getDisplayOrderPriority()
public final boolean getSortDescending()
public String toString()
toString in class ObjectObject.toString()public void dump()
public void dump(PrintStream ps)
ps - PrintStream to dump topublic String eqClause(Object raw)
raw - An object with an equivalent SQL type
public Enumeration<Persistent> selectionWhereEq(Object raw)
raw - a raw value such as a String
public Persistent firstWhereEq(Object raw)
raw - Object of correct type for this Column
public CachedSelection cachedSelectionWhereEq(Object raw)
raw - Object of correct type for this Column
public abstract Object getRaw(Persistent g)
throws AccessPoemException
Column.
g - the Persistent to read
AccessPoemException - if the current AccessToken
does not confer read access rightspublic abstract Object getRaw_unsafe(Persistent g)
Column.
g - the Persistent to read
public abstract void setRaw(Persistent g,
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,
Object raw)
Column.
g - the Persistent to modifyraw - the value to set the field to
public abstract 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,
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,
String rawString)
g - the Persistent to alterrawString - the String representation of the value to setpublic Enumeration<Persistent> 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(String whereClause)
whereClause -
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||