|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectorg.melati.poem.Field
public class Field
A Field. A field is a value (the raw) with its metadata (a set of attributes) and possibly an access violation if the current user is not allowed to access it.
| Constructor Summary | |
|---|---|
Field(AccessPoemException accessException,
FieldAttributes attrs)
Constructor for a Field with an access violation. |
|
Field(Object raw,
FieldAttributes attrs)
Constructor. |
|
| Method Summary | |
|---|---|
static Field |
basic(Object value,
String name,
PoemType type)
A convenience method to create a Field. |
Object |
clone()
|
void |
dump(PrintStream p)
Dump to a PrintStream. |
Object |
getCooked()
|
String |
getCookedString()
|
String |
getCookedString(PoemLocale locale,
int style)
|
String |
getDescription()
|
String |
getDisplayName()
|
Enumeration |
getFirst1000Possibilities()
Return a limited enumeration of possibilities. |
int |
getHeight()
|
boolean |
getIndexed()
|
String |
getName()
|
Enumeration |
getPossibilities()
Might be a bit big for some Reference types. |
Object |
getRaw()
Get the value of the Field. |
Object |
getRawString()
Get the value as a String. |
String |
getRenderInfo()
|
PoemType |
getType()
|
boolean |
getUserCreateable()
|
boolean |
getUserEditable()
|
int |
getWidth()
|
static Field |
integer(Integer value,
String name)
A convenience method to create nullable Integer Field. |
static Field |
reference(Persistent value,
String name)
A convenience method to create a populated, nullable, Reference Field. |
static Field |
reference(Table table,
String name)
A convenience method to create new unpopulated, nullable Reference Field. |
boolean |
sameRawAs(Field other)
Compare raws. |
static Field |
string(String value,
String name)
A convenience method to create nullable String Field. |
String |
toString()
Dump to a string. |
Field |
withDescription(String description)
Clone with a new description. |
Field |
withName(String name)
Clone with a new name. |
Field |
withNullable(boolean nullable)
Clone with a different nullability. |
Field |
withRaw(Object rawP)
Clone this Field with a new value but same metadata. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Field(Object raw,
FieldAttributes attrs)
raw - the object value, integer for reference typesattrs - the metadata attributes to set
public Field(AccessPoemException accessException,
FieldAttributes attrs)
accessException - the access violationattrs - the metadata attributes to set| Method Detail |
|---|
public Object clone()
clone in class ObjectObject.clone()public String getName()
getName in interface FieldAttributesFieldAttributes.getName()public String getDisplayName()
getDisplayName in interface FieldAttributesFieldAttributes.getDisplayName()public String getDescription()
getDescription in interface FieldAttributesFieldAttributes.getDescription()public PoemType getType()
getType in interface FieldAttributesFieldAttributes.getType()public boolean getIndexed()
getIndexed in interface FieldAttributesFieldAttributes.getIndexed()public boolean getUserEditable()
getUserEditable in interface FieldAttributesFieldAttributes.getUserEditable()public boolean getUserCreateable()
getUserCreateable in interface FieldAttributesFieldAttributes.getUserCreateable()public int getWidth()
getWidth in interface FieldAttributesFieldAttributes.getWidth()public int getHeight()
getHeight in interface FieldAttributesFieldAttributes.getHeight()public String getRenderInfo()
getRenderInfo in interface FieldAttributesFieldAttributes.getRenderInfo()
public final Object getRaw()
throws AccessPoemException
AccessPoemException
public final Object getRawString()
throws AccessPoemException
AccessPoemException - if the current AccessToken does not permit reading
public final Object getCooked()
throws AccessPoemException
AccessPoemException - if the current AccessToken does not permit reading
public final String getCookedString()
throws AccessPoemException
AccessPoemException
public final String getCookedString(PoemLocale locale,
int style)
throws AccessPoemException
locale - style -
AccessPoemException - if the current AccessToken does not permit readingpublic Field withRaw(Object rawP)
rawP - new value to set
public Field withNullable(boolean nullable)
nullable - the new nullability
public Field withName(String name)
name - the new name
public Field withDescription(String description)
description - the new description
public Enumeration getPossibilities()
null for String or Integer Types.
public Enumeration getFirst1000Possibilities()
public boolean sameRawAs(Field other)
throws AccessPoemException
other - another field to check
AccessPoemException - if it is already setpublic void dump(PrintStream p)
p - the PRintStream to write topublic String toString()
toString in class ObjectObject.toString()
public static Field basic(Object value,
String name,
PoemType type)
value - the Object to set the value toname - the name of the new Field, also used as descriptiontype - the PoemType of the Field
public static Field string(String value,
String name)
value - the String to set the value toname - the name of the new Field, also used as description
public static Field integer(Integer value,
String name)
value - the Integer to set the value toname - the name of the new Field, also used as description
public static Field reference(Persistent value,
String name)
value - the Persistent to set the value toname - the name of the new Field, also used as description
public static Field reference(Table table,
String name)
table - the Table to refer toname - the name of the new Field, also used as description
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||