|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 Persistent s 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 fromMethod 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 FieldAttributes
FieldAttributes.getName()
public final String quotedName()
public final String fullQuotedName()
public final String getDisplayName()
getDisplayName
in interface FieldAttributes
FieldAttributes.getDisplayName()
public final String getDescription()
getDescription
in interface FieldAttributes
FieldAttributes.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 FieldAttributes
FieldAttributes.getUserEditable()
public final boolean getUserCreateable()
getUserCreateable
in interface FieldAttributes
FieldAttributes.getUserCreateable()
public final SQLPoemType getSQLType()
public final PoemType<?> getType()
getType
in interface FieldAttributes
FieldAttributes.getType()
public final boolean isTroidColumn()
public final boolean isDeletedColumn()
public final boolean getIndexed()
getIndexed
in interface FieldAttributes
FieldAttributes.getIndexed()
public final boolean getUnique()
public IntegrityFix getIntegrityFix()
public void setIntegrityFix(StandardIntegrityFix fix)
fix
- the IntegrityFix to setpublic final String getRenderInfo()
getRenderInfo
in interface FieldAttributes
FieldAttributes.getRenderInfo()
public final int getWidth()
getWidth
in interface FieldAttributes
FieldAttributes.getWidth()
public final int getHeight()
getHeight
in interface FieldAttributes
FieldAttributes.getHeight()
public final Integer getDisplayOrderPriority()
public final boolean getSortDescending()
public String toString()
toString
in class Object
Object.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 validpublic abstract void setRaw_unsafe(Persistent g, Object raw)
Column
.
g
- the Persistent
to modifyraw
- the value to set the field topublic 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 occurspublic 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)
Persistent
s 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
Persistent
s 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 |