|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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) LinkedHashMap<String,FieldDefinition> |
fields
|
(package private) QueryFragmentFunctions |
functions
|
(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 |
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? |
(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 |
getFunctionOrPointedFunction(String nm)
returns the field info associated with a name |
QueryFragmentFunctions |
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. |
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 |
getStructure()
|
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
QueryFragmentFunctions functions
String title
String indexName
static final String createName
static final String modifyName
String mainPtr
String setField
int relations
LinkedHashMap<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 DataDefinition
protected void addField1(FieldDefinition fi)
public void addField(FieldDefinition fi)
addField
in interface DataDefinition
public 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 DataDefinition
public ArrayList<FieldDefinition> getReferenceFields()
DataDefinition
getReferenceFields
in interface DataDefinition
public ArrayList<FieldDefinition> getUniqueFields()
DataDefinition
getUniqueFields
in interface DataDefinition
public FieldDefinition getFieldDefinition(String nm)
getFieldDefinition
in interface DataDefinition
public FieldDefinition getFieldOrPointedFieldDefinition(String nm)
getFieldOrPointedFieldDefinition
in interface DataDefinition
public FieldDefinition getFieldDefinition(int n)
getFieldDefinition
in interface DataDefinition
public String getName()
getName
in interface DataDefinition
getName
in interface ValidationDefinition
String getBaseName()
public String fieldPrefix()
RecordInfo makeSubtable(String name)
public String getIndexPointerFieldName()
getIndexPointerFieldName
in interface DataDefinition
public String getSetOwnerFieldName()
getSetOwnerFieldName
in interface DataDefinition
public String getTitleFieldName()
getTitleFieldName
in interface DataDefinition
public String getCreationDateFieldName()
getCreationDateFieldName
in interface DataDefinition
public String getLastModificationDateFieldName()
getLastModificationDateFieldName
in interface DataDefinition
public FieldDefinition getParentField()
getParentField
in interface DataDefinition
public String getSetMemberFieldName()
getSetMemberFieldName
in interface DataDefinition
public void checkFieldNames(Dictionary<String,Object> d)
DataDefinition
checkFieldNames
in interface DataDefinition
public String toString()
toString
in class Object
public URL getOrigin()
public long lastModified()
DataDefinition
lastModified
in interface DataDefinition
public DataDefinition getDataDefinition()
ValidationDefinition
getDataDefinition
in interface ValidationDefinition
public 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 ValidationDefinition
public Collection<ValidationRule> getValidationRules(String fieldName)
ValidationDefinition
getValidationRules
in interface ValidationDefinition
public ValidationDefinition getValidationDefinition()
DataDefinition
getValidationDefinition
in interface DataDefinition
public boolean hasValidationRules()
hasValidationRules
in interface ValidationDefinition
public DataDefinition.MultipleUniqueKeyDefinition[] getMultiFieldUniqueKeys()
DataDefinition
getMultiFieldUniqueKeys
in interface DataDefinition
public void addMultiUniqueKey(DataDefinition.MultipleUniqueKeyDefinition definition)
DataDefinition
addMultiUniqueKey
in interface DataDefinition
public boolean hasMultiUniqueKey(String[] fieldNames)
DataDefinition
hasMultiUniqueKey
in interface DataDefinition
public void checkUpdate(String fieldName, Dictionary<String,Object> d)
DataDefinition
checkUpdate
in interface DataDefinition
public QueryFragmentFunctions getFunctions()
DataDefinition
getFunctions
in interface DataDefinition
public DataDefinition.QueryFragmentFunction getFunctionOrPointedFunction(String nm)
getFunctionOrPointedFunction
in interface DataDefinition
public String getStructure()
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |