public class RecordDefinitionImpl extends AbstractRecordStoreSchemaElement implements RecordDefinition
| Constructor and Description |
|---|
RecordDefinitionImpl() |
RecordDefinitionImpl(Map<String,Object> properties) |
RecordDefinitionImpl(RecordDefinition recordDefinition) |
RecordDefinitionImpl(RecordStoreSchema schema,
RecordDefinition recordDefinition) |
RecordDefinitionImpl(RecordStoreSchema schema,
String path) |
RecordDefinitionImpl(RecordStoreSchema schema,
String path,
Map<String,Object> properties,
List<FieldDefinition> fields) |
RecordDefinitionImpl(String path) |
RecordDefinitionImpl(String path,
FieldDefinition... fields) |
RecordDefinitionImpl(String path,
List<FieldDefinition> fields) |
RecordDefinitionImpl(String path,
Map<String,Object> properties,
FieldDefinition... fields) |
RecordDefinitionImpl(String path,
Map<String,Object> properties,
List<FieldDefinition> fields) |
| Modifier and Type | Method and Description |
|---|---|
void |
addColumnCodeTable(String column,
CodeTable codeTable) |
void |
addDefaultValue(String fieldName,
Object defaultValue) |
void |
addField(FieldDefinition field) |
FieldDefinition |
addField(String fieldName,
DataType type)
Adds an field with the given case-sensitive name.
|
FieldDefinition |
addField(String name,
DataType type,
boolean required) |
FieldDefinition |
addField(String name,
DataType type,
int length,
boolean required) |
FieldDefinition |
addField(String name,
DataType type,
int length,
int scale,
boolean required) |
void |
addRestriction(String fieldPath,
Collection<Object> values) |
void |
addSuperClass(RecordDefinition superClass) |
void |
cloneProperties(Map<String,Object> properties) |
static RecordDefinitionImpl |
create(Map<String,Object> properties) |
Record |
createRecord() |
void |
delete(Record record) |
void |
destroy() |
static void |
destroy(RecordDefinitionImpl... recordDefinitionList) |
CodeTable |
getCodeTableByColumn(String column) |
Object |
getDefaultValue(String fieldName) |
Map<String,Object> |
getDefaultValues() |
String |
getDescription() |
FieldDefinition |
getField(CharSequence name) |
FieldDefinition |
getField(int i) |
Class<?> |
getFieldClass(CharSequence name) |
Class<?> |
getFieldClass(int i) |
int |
getFieldCount()
Get the number of fields supported by the type.
|
int |
getFieldIndex(CharSequence name)
Get the index of the named field within the list of fields for the
type.
|
int |
getFieldLength(int i)
Get the maximum length of the field.
|
String |
getFieldName(int i)
Get the name of the field at the specified index.
|
List<String> |
getFieldNames()
Get the names of all the fields supported by the type.
|
List<FieldDefinition> |
getFields() |
int |
getFieldScale(int i)
Get the maximum number of decimal places of the field
|
String |
getFieldTitle(String fieldName) |
List<String> |
getFieldTitles() |
DataType |
getFieldType(CharSequence name) |
DataType |
getFieldType(int i)
Get the type name of the field at the specified index.
|
GeometryFactory |
getGeometryFactory() |
FieldDefinition |
getGeometryField() |
int |
getGeometryFieldIndex()
Get the index of the primary Geometry field.
|
List<Integer> |
getGeometryFieldIndexes()
Get the index of all Geometry fields.
|
String |
getGeometryFieldName()
Get the name of the primary Geometry field.
|
List<String> |
getGeometryFieldNames()
Get the name of the all Geometry fields.
|
FieldDefinition |
getIdField() |
int |
getIdFieldIndex()
Get the index of the Unique identifier field.
|
List<Integer> |
getIdFieldIndexes()
Get the index of all ID fields.
|
String |
getIdFieldName()
Get the name of the Unique identifier field.
|
List<String> |
getIdFieldNames()
Get the name of the all ID fields.
|
List<FieldDefinition> |
getIdFields() |
int |
getInstanceId() |
static RecordDefinition |
getRecordDefinition(int instanceId) |
RecordDefinitionFactory |
getRecordDefinitionFactory() |
RecordFactory |
getRecordFactory() |
Map<String,Collection<Object>> |
getRestrictions() |
boolean |
hasField(CharSequence name)
Check to see if the type has the specified field name.
|
boolean |
isFieldDefinition(CharSequence name) |
boolean |
isFieldDefinition(int i)
Return true if a value for the field is required.
|
boolean |
isInstanceOf(RecordDefinition classDefinition) |
RecordDefinitionImpl |
rename(String path) |
void |
replaceField(FieldDefinition field,
FieldDefinition newFieldDefinition) |
void |
setCodeTableByColumnMap(Map<String,CodeTable> codeTableByColumnMap) |
void |
setDefaultValues(Map<String,? extends Object> defaultValues) |
void |
setDescription(String description) |
void |
setGeometryFactory(GeometryFactory geometryFactory) |
void |
setGeometryFieldIndex(int geometryFieldDefinitionIndex) |
void |
setGeometryFieldName(String name) |
void |
setIdFieldIndex(int idFieldDefinitionIndex) |
void |
setIdFieldName(String name) |
void |
setIdFieldNames(Collection<String> names) |
void |
setIdFieldNames(String... names) |
void |
setProperties(Map<String,? extends Object> properties) |
void |
setRecordDefinitionFactory(RecordDefinitionFactory recordDefinitionFactory) |
Map<String,Object> |
toMap()
Convert the object to a Map of property name, value pairs.
|
close, compareTo, equalPath, equals, getName, getPath, getRecordStore, getSchema, hashCode, toStringclearProperties, getProperties, getProperty, getProperty, removeProperty, setProperty, setPropertySoft, setPropertyWeakclone, finalize, getClass, notify, notifyAll, wait, wait, waitequalPath, getName, getPath, getRecordStore, getSchemaclearProperties, getProperties, getProperty, getProperty, removeProperty, setProperty, setPropertySoft, setPropertyWeakcompareTopublic RecordDefinitionImpl()
public RecordDefinitionImpl(RecordDefinition recordDefinition)
public RecordDefinitionImpl(RecordStoreSchema schema, RecordDefinition recordDefinition)
public RecordDefinitionImpl(RecordStoreSchema schema, String path)
public RecordDefinitionImpl(RecordStoreSchema schema, String path, Map<String,Object> properties, List<FieldDefinition> fields)
public RecordDefinitionImpl(String path)
public RecordDefinitionImpl(String path, FieldDefinition... fields)
public RecordDefinitionImpl(String path, List<FieldDefinition> fields)
public RecordDefinitionImpl(String path, Map<String,Object> properties, FieldDefinition... fields)
public static RecordDefinitionImpl create(Map<String,Object> properties)
public static void destroy(RecordDefinitionImpl... recordDefinitionList)
public static RecordDefinition getRecordDefinition(int instanceId)
public void addDefaultValue(String fieldName, Object defaultValue)
addDefaultValue in interface RecordDefinitionpublic void addField(FieldDefinition field)
public FieldDefinition addField(String fieldName, DataType type)
public FieldDefinition addField(String name, DataType type, boolean required)
public FieldDefinition addField(String name, DataType type, int length, boolean required)
public FieldDefinition addField(String name, DataType type, int length, int scale, boolean required)
public void addRestriction(String fieldPath, Collection<Object> values)
public void addSuperClass(RecordDefinition superClass)
public Record createRecord()
createRecord in interface RecordDefinitionpublic void delete(Record record)
delete in interface RecordDefinition@PreDestroy public void destroy()
destroy in interface RecordDefinitionpublic CodeTable getCodeTableByColumn(String column)
getCodeTableByColumn in interface RecordDefinitionpublic Object getDefaultValue(String fieldName)
getDefaultValue in interface RecordDefinitionpublic Map<String,Object> getDefaultValues()
getDefaultValues in interface RecordDefinitionpublic String getDescription()
public FieldDefinition getField(CharSequence name)
getField in interface RecordDefinitionpublic FieldDefinition getField(int i)
getField in interface RecordDefinitionpublic Class<?> getFieldClass(CharSequence name)
getFieldClass in interface RecordDefinitionpublic Class<?> getFieldClass(int i)
getFieldClass in interface RecordDefinitionpublic int getFieldCount()
RecordDefinitiongetFieldCount in interface RecordDefinitionpublic int getFieldIndex(CharSequence name)
RecordDefinitiongetFieldIndex in interface RecordDefinitionname - The field name.public int getFieldLength(int i)
RecordDefinitiongetFieldLength in interface RecordDefinitioni - The field index.public String getFieldName(int i)
RecordDefinitiongetFieldName in interface RecordDefinitioni - The field index.public List<String> getFieldNames()
RecordDefinitiongetFieldNames in interface RecordDefinitionpublic List<FieldDefinition> getFields()
getFields in interface RecordDefinitionpublic int getFieldScale(int i)
RecordDefinitiongetFieldScale in interface RecordDefinitioni - The field index.public String getFieldTitle(String fieldName)
getFieldTitle in interface RecordDefinitionpublic List<String> getFieldTitles()
getFieldTitles in interface RecordDefinitionpublic DataType getFieldType(CharSequence name)
getFieldType in interface RecordDefinitionpublic DataType getFieldType(int i)
RecordDefinitiongetFieldType in interface RecordDefinitioni - The field index.public GeometryFactory getGeometryFactory()
getGeometryFactory in interface RecordDefinitionpublic FieldDefinition getGeometryField()
getGeometryField in interface RecordDefinitionpublic int getGeometryFieldIndex()
RecordDefinitiongetGeometryFieldIndex in interface RecordDefinitionpublic List<Integer> getGeometryFieldIndexes()
RecordDefinitiongetGeometryFieldIndexes in interface RecordDefinitionpublic String getGeometryFieldName()
RecordDefinitiongetGeometryFieldName in interface RecordDefinitionpublic List<String> getGeometryFieldNames()
RecordDefinitiongetGeometryFieldNames in interface RecordDefinitionpublic FieldDefinition getIdField()
getIdField in interface RecordDefinitionpublic int getIdFieldIndex()
RecordDefinitiongetIdFieldIndex in interface RecordDefinitionpublic List<Integer> getIdFieldIndexes()
RecordDefinitiongetIdFieldIndexes in interface RecordDefinitionpublic String getIdFieldName()
RecordDefinitiongetIdFieldName in interface RecordDefinitionpublic List<String> getIdFieldNames()
RecordDefinitiongetIdFieldNames in interface RecordDefinitionpublic List<FieldDefinition> getIdFields()
getIdFields in interface RecordDefinitionpublic int getInstanceId()
getInstanceId in interface RecordDefinitionpublic RecordDefinitionFactory getRecordDefinitionFactory()
getRecordDefinitionFactory in interface RecordDefinitionpublic RecordFactory getRecordFactory()
getRecordFactory in interface RecordDefinitionpublic Map<String,Collection<Object>> getRestrictions()
public boolean hasField(CharSequence name)
RecordDefinitionhasField in interface RecordDefinitionname - The name of the field.public boolean isFieldDefinition(CharSequence name)
isFieldDefinition in interface RecordDefinitionpublic boolean isFieldDefinition(int i)
RecordDefinitionisFieldDefinition in interface RecordDefinitioni - The field index.public boolean isInstanceOf(RecordDefinition classDefinition)
isInstanceOf in interface RecordDefinitionpublic RecordDefinitionImpl rename(String path)
public void replaceField(FieldDefinition field, FieldDefinition newFieldDefinition)
public void setCodeTableByColumnMap(Map<String,CodeTable> codeTableByColumnMap)
public void setDefaultValues(Map<String,? extends Object> defaultValues)
setDefaultValues in interface RecordDefinitionpublic void setDescription(String description)
public void setGeometryFactory(GeometryFactory geometryFactory)
setGeometryFactory in interface RecordDefinitionpublic void setGeometryFieldIndex(int geometryFieldDefinitionIndex)
geometryFieldDefinitionIndex - the geometryFieldDefinitionIndex to setpublic void setGeometryFieldName(String name)
public void setIdFieldIndex(int idFieldDefinitionIndex)
idFieldDefinitionIndex - the idFieldDefinitionIndex to setpublic void setIdFieldName(String name)
public void setIdFieldNames(Collection<String> names)
public void setIdFieldNames(String... names)
public void setProperties(Map<String,? extends Object> properties)
setProperties in interface ObjectWithPropertiessetProperties in class AbstractObjectWithPropertiespublic void setRecordDefinitionFactory(RecordDefinitionFactory recordDefinitionFactory)
public Map<String,Object> toMap()
MapSerializerConvert the object to a Map of property name, value pairs. The values can be one of the following supported types. Other values should be converted to one of these values.
toMap in interface MapSerializerCopyright © 2015 Revolution Systems Inc.. All rights reserved.