|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.makumba.providers.datadefinition.makumba.RecordInfo
public class RecordInfo
This is the internal representation of the org.makumba. One can make RecordHandlers based on an instance of this class and do useful things with it (generate sql tables, html code, etc)
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.makumba.DataDefinition |
|---|
DataDefinition.MultipleUniqueKeyDefinition, DataDefinition.QueryFragmentFunction |
| Field Summary | |
|---|---|
(package private) static String |
createName
|
(package private) Vector<String> |
fieldOrder
|
(package private) HashMap<String,FieldDefinition> |
fields
|
(package private) HashMap<String,DataDefinition.QueryFragmentFunction> |
functionNames
|
(package private) String |
indexName
|
static int |
infos
|
(package private) String |
mainPtr
|
(package private) static String |
modifyName
|
(package private) String |
name
|
(package private) URL |
origin
|
(package private) RecordInfo |
papa
|
(package private) String |
ptrSubfield
|
(package private) int |
relations
|
(package private) String |
setField
|
(package private) String |
subfield
|
(package private) String |
subfieldPtr
|
(package private) Properties |
templateValues
|
(package private) String |
title
|
protected static String |
webappRoot
|
| Constructor Summary | |
|---|---|
RecordInfo()
|
|
RecordInfo(RecordInfo ri,
String subfield)
|
|
RecordInfo(String name)
make a temporary recordInfo that is only used for query results |
|
RecordInfo(URL origin,
String path)
|
|
| Method Summary | |
|---|---|
void |
addField(FieldDefinition fi)
only meant for building of temporary types |
protected void |
addField1(FieldDefinition fi)
|
void |
addFunction(String name,
DataDefinition.QueryFragmentFunction function)
adds a new function to this data definition. |
void |
addMultiUniqueKey(DataDefinition.MultipleUniqueKeyDefinition definition)
Add a multiple-feld uniqueness definition. |
void |
addRule(String fieldName,
Collection<ValidationRule> rules)
Add several rules for the given field. |
void |
addRule(String fieldName,
ValidationRule rule)
Add a new rule for the given field. |
(package private) void |
addStandardFields(String name)
|
void |
addValidationRule(ValidationRule rule)
|
void |
checkFieldNames(Dictionary<String,Object> d)
Checks whether all fieldnames exist in the database |
void |
checkUpdate(String fieldName,
Dictionary<String,Object> d)
Checks whether a record can be updated * |
String |
fieldPrefix()
if this is a subtable, the field prefix is maintable-> TODO: see if this method is still needed, can't it be expressed in terms of the DataDefinition interface? |
Collection<DataDefinition.QueryFragmentFunction> |
getActorFunctions()
returns all actor functions in this data definition. |
(package private) String |
getBaseName()
|
String |
getCreationDateFieldName()
which is the name of the creation timestamp field, if any? |
DataDefinition |
getDataDefinition()
Get the data definition associated with this validation definition. |
FieldDefinition |
getFieldDefinition(int n)
the field with the respective index, null if such a field doesn't exist |
FieldDefinition |
getFieldDefinition(String nm)
returns the field info associated with a name |
Vector<String> |
getFieldNames()
returns all the field names |
FieldDefinition |
getFieldOrPointedFieldDefinition(String nm)
returns the field info associated with a name |
DataDefinition.QueryFragmentFunction |
getFunction(String name)
Returns the function with the specific name. |
Collection<DataDefinition.QueryFragmentFunction> |
getFunctions()
returns all functions in this data definition. |
String |
getIndexPointerFieldName()
which is the name of the index field, if any? |
String |
getLastModificationDateFieldName()
which is the name of the modification timestamp field, if any? |
DataDefinition.MultipleUniqueKeyDefinition[] |
getMultiFieldUniqueKeys()
Get all multiple-feld uniqueness definition. |
String |
getName()
returns the path-like abstract-level name of this record info |
URL |
getOrigin()
|
FieldDefinition |
getParentField()
If this type is the data pointed by a 1-1 pointer or subset, return the type of the main record, otherwise return null |
static DataDefinition |
getRecordInfo(String name)
returns the record info with the given absolute name |
ArrayList<FieldDefinition> |
getReferenceFields()
Gets all the fields that are references to other tables, i.e. pointers and some types of sets. |
Collection<DataDefinition.QueryFragmentFunction> |
getSessionFunctions()
returns all actor functions in this data definition. |
String |
getSetMemberFieldName()
which is the name of the set member (Pointer, Character or Integer), for set subtables |
String |
getSetOwnerFieldName()
which is the name of the pointer to the main table, for set and internal set subtables |
static DataDefinition |
getSimpleRecordInfo(String path)
|
String |
getTitleFieldName()
the title field indicated, or the default one |
ArrayList<FieldDefinition> |
getUniqueFields()
Gets all the fields that have the unique modifier. |
ValidationDefinition |
getValidationDefinition()
Get the validation definition associated with this data definition. |
ValidationRule |
getValidationRule(String ruleName)
Get the validation rule with the given rule name. |
Collection<ValidationRule> |
getValidationRules(String fieldName)
Get all validation rules for the given field name. |
boolean |
hasMultiUniqueKey(String[] fieldNames)
Check whether this data definition has a multi-field uniqe key defined with the given fields. |
boolean |
hasValidationRules()
|
boolean |
isTemporary()
tells whether this data definition was generated temporarily to depict a query result as opposed to being read from an MDD file |
long |
lastModified()
Indicates when the data definition was modified the last time |
(package private) RecordInfo |
makeSubtable(String name)
|
static void |
setWebappRoot(String s)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static String webappRoot
URL origin
String name
Properties templateValues
Vector<String> fieldOrder
HashMap<String,DataDefinition.QueryFragmentFunction> functionNames
String title
String indexName
static final String createName
static final String modifyName
String mainPtr
String setField
int relations
HashMap<String,FieldDefinition> fields
String subfield
String ptrSubfield
String subfieldPtr
RecordInfo papa
public static int infos
| Constructor Detail |
|---|
RecordInfo()
public RecordInfo(String name)
RecordInfo(URL origin,
String path)
RecordInfo(RecordInfo ri,
String subfield)
| Method Detail |
|---|
public static void setWebappRoot(String s)
void addStandardFields(String name)
public boolean isTemporary()
DataDefinition
isTemporary in interface DataDefinitionprotected void addField1(FieldDefinition fi)
public void addField(FieldDefinition fi)
addField in interface DataDefinitionpublic static DataDefinition getRecordInfo(String name)
DataDefinitionNotFoundError - if the name is not a valid record info name
DataDefinitionParseError - if the syntax is wrong or a referred resource can't be foundpublic static DataDefinition getSimpleRecordInfo(String path)
public Vector<String> getFieldNames()
getFieldNames in interface DataDefinitionpublic ArrayList<FieldDefinition> getReferenceFields()
DataDefinition
getReferenceFields in interface DataDefinitionpublic ArrayList<FieldDefinition> getUniqueFields()
DataDefinition
getUniqueFields in interface DataDefinitionpublic FieldDefinition getFieldDefinition(String nm)
getFieldDefinition in interface DataDefinitionpublic FieldDefinition getFieldOrPointedFieldDefinition(String nm)
getFieldOrPointedFieldDefinition in interface DataDefinitionpublic FieldDefinition getFieldDefinition(int n)
getFieldDefinition in interface DataDefinitionpublic DataDefinition.QueryFragmentFunction getFunction(String name)
DataDefinition
getFunction in interface DataDefinition
public void addFunction(String name,
DataDefinition.QueryFragmentFunction function)
DataDefinition
addFunction in interface DataDefinitionpublic Collection<DataDefinition.QueryFragmentFunction> getFunctions()
DataDefinition
getFunctions in interface DataDefinitionpublic Collection<DataDefinition.QueryFragmentFunction> getActorFunctions()
DataDefinition
getActorFunctions in interface DataDefinitionpublic Collection<DataDefinition.QueryFragmentFunction> getSessionFunctions()
DataDefinition
getSessionFunctions in interface DataDefinitionpublic String getName()
getName in interface DataDefinitiongetName in interface ValidationDefinitionString getBaseName()
public String fieldPrefix()
RecordInfo makeSubtable(String name)
public String getIndexPointerFieldName()
getIndexPointerFieldName in interface DataDefinitionpublic String getSetOwnerFieldName()
getSetOwnerFieldName in interface DataDefinitionpublic String getTitleFieldName()
getTitleFieldName in interface DataDefinitionpublic String getCreationDateFieldName()
getCreationDateFieldName in interface DataDefinitionpublic String getLastModificationDateFieldName()
getLastModificationDateFieldName in interface DataDefinitionpublic FieldDefinition getParentField()
getParentField in interface DataDefinitionpublic String getSetMemberFieldName()
getSetMemberFieldName in interface DataDefinitionpublic void checkFieldNames(Dictionary<String,Object> d)
DataDefinition
checkFieldNames in interface DataDefinitionpublic String toString()
toString in class Objectpublic URL getOrigin()
public long lastModified()
DataDefinition
lastModified in interface DataDefinitionpublic DataDefinition getDataDefinition()
ValidationDefinition
getDataDefinition in interface ValidationDefinitionpublic void addValidationRule(ValidationRule rule)
public ValidationRule getValidationRule(String ruleName)
ValidationDefinition
getValidationRule in interface ValidationDefinition
public void addRule(String fieldName,
Collection<ValidationRule> rules)
ValidationDefinition
addRule in interface ValidationDefinition
public void addRule(String fieldName,
ValidationRule rule)
ValidationDefinition
addRule in interface ValidationDefinitionpublic Collection<ValidationRule> getValidationRules(String fieldName)
ValidationDefinition
getValidationRules in interface ValidationDefinitionpublic ValidationDefinition getValidationDefinition()
DataDefinition
getValidationDefinition in interface DataDefinitionpublic boolean hasValidationRules()
hasValidationRules in interface ValidationDefinitionpublic DataDefinition.MultipleUniqueKeyDefinition[] getMultiFieldUniqueKeys()
DataDefinition
getMultiFieldUniqueKeys in interface DataDefinitionpublic void addMultiUniqueKey(DataDefinition.MultipleUniqueKeyDefinition definition)
DataDefinition
addMultiUniqueKey in interface DataDefinitionpublic boolean hasMultiUniqueKey(String[] fieldNames)
DataDefinition
hasMultiUniqueKey in interface DataDefinition
public void checkUpdate(String fieldName,
Dictionary<String,Object> d)
DataDefinition
checkUpdate in interface DataDefinition
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||