public interface SchemaI
SchemaI
interface defines the methods for accessing and manipulating schema information
in the IPCON MyTISM system.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ATT_NAME_DEFAULT_PACKAGE |
static char |
INITIALDATA_LINE_ENCLOSING_CHAR |
static char |
INITIALDATA_LINE_SEPARATOR_CHAR |
static java.lang.String |
INITIALDATA_SCHEMA_ADDITIONS_FILENAME |
static java.lang.String |
MD_DISABLE |
static java.lang.String |
MD_NON_DESTRUCTIVE |
static java.lang.String |
MD_RECREATE_INDEXES |
static int |
NAME_MINLENGTH |
static java.lang.String |
RELATION_TYPE_1_N
Type representing one-to-many relations with value "1-n".
|
static java.lang.String |
RELATION_TYPE_N_1
Type representing many-to-one relations with value "n-1".
|
static java.lang.String |
RELATION_TYPE_N_M
Type representing many-to-many relations with value "n-m".
|
Modifier and Type | Method and Description |
---|---|
void |
addRelationObject(java.lang.Object bo,
java.lang.String attPath,
java.lang.Object toAdd) |
AggregateFunctionI |
aggregate(AggregateFunctionI a,
BOI bo,
java.lang.String pathlist) |
AggregateFunctionI |
aggregate(java.lang.String aggregateName,
BOI bo,
java.lang.String pathlist) |
AggregateFunctionI |
aggregate(java.lang.String aggregateName,
BOI bo,
java.lang.String pathlist,
java.lang.String parameters) |
static void |
checkSyntacticallyValid(electric.xml.Element el,
java.lang.String s,
java.lang.String name)
Checks if the given
String represents a syntactically valid name for an entity or attribute. |
ScriptFunctionI |
createFunction(java.lang.String language,
java.lang.String src) |
ScriptFunctionI |
createFunction(java.lang.String language,
java.lang.String src,
java.lang.String[] parmNames,
java.lang.Class[] parmTypes) |
ScriptFunctionI |
createFunction(java.lang.String language,
java.lang.String src,
java.lang.String[] parmNames,
java.lang.Class[] parmTypes,
java.lang.Class returnType) |
ScriptFunctionI |
createFunction(java.lang.String language,
java.lang.String src,
java.lang.String[] parmNames,
java.lang.Class[] parmTypes,
java.lang.Class returnType,
java.lang.String scriptName) |
ScriptFunctionI |
createFunction(java.lang.String language,
java.lang.String src,
java.lang.String[] parmNames,
java.lang.Class[] parmTypes,
java.lang.Class returnType,
java.lang.String scriptName,
java.lang.String functionName) |
ScriptFunctionI |
createFunction(java.lang.String language,
java.lang.String src,
java.lang.String[] parmNames,
java.lang.Class[] parmTypes,
java.lang.Class returnType,
java.lang.String scriptName,
java.lang.String functionName,
int lineOffset) |
ScriptFunctionI |
createFunctionFromXML(java.lang.String xml,
java.lang.String[] parmNames,
java.lang.Class[] parmTypes) |
ScriptFunctionI |
createFunctionFromXML(java.lang.String xml,
java.lang.String[] parmNames,
java.lang.Class[] parmTypes,
java.lang.Class returnType) |
ScriptFunctionI |
createFunctionFromXML(java.lang.String xml,
java.lang.String[] parmNames,
java.lang.Class[] parmTypes,
java.lang.Class returnType,
java.lang.String scriptName,
java.lang.String functionName) |
ScriptFunctionI |
createFunctionFromXML(java.lang.String xml,
java.lang.String[] parmNames,
java.lang.Class[] parmTypes,
java.lang.Class returnType,
java.lang.String scriptName,
java.lang.String functionName,
int lineOffset) |
java.lang.String |
describe(java.lang.Object o)
"format" an object.
|
java.lang.String |
describe(java.lang.Object o,
java.lang.String formatdef)
"format" an object.
|
java.lang.String |
describe(java.lang.Object o,
java.lang.String formatdef,
java.util.Map variables)
"format" an object.
|
java.lang.String |
describe(java.lang.Object o,
java.lang.String formatdef,
java.util.Map variables,
SchemaI onBehalfOfSchema)
"format" an object.
|
default java.lang.String |
describeNE(java.lang.Object o)
"format" an object but never return an empty String.
|
default java.lang.String |
describeNE(java.lang.Object o,
java.lang.String formatdef)
"format" an object but never return an empty String.
|
default java.lang.String |
describeNE(java.lang.Object o,
java.lang.String formatdef,
java.util.Map variables)
"format" an object but never return an empty String.
|
default java.lang.String |
describeNE(java.lang.Object o,
java.lang.String formatdef,
java.util.Map variables,
SchemaI onBehalfOfSchema)
"format" an object but never return an empty String.
|
java.lang.String |
flattenToString()
Generates a normalized string representation of the schema.
|
AnnotatedValue |
getAnnotatedValue(java.lang.Object bo,
java.lang.String attPath) |
AnnotatedValue |
getAnnotatedValueAsString(java.lang.Object bo,
java.lang.String attPath) |
AttributeI |
getAttribute(java.lang.Object bo,
java.lang.String attPath)
Getting Attributes via name or given object.
|
AttributeI |
getAttribute(java.lang.Object bo,
java.lang.String attPath,
boolean noThrow)
Getting Attributes via name or given object.
|
BOI |
getBOForLastPathElement(BOI rootBo,
java.lang.String path) |
default java.lang.String[] |
getBundleLookupPath(java.lang.String bundleName,
java.lang.String bundlePostfix)
Generates an array of lookup paths for a resource bundle.
|
BOI |
getClosestAvailableAggregateAnchor(BOI bo,
java.lang.String pathlist) |
CryptoHandlerI |
getCryptoHandler()
Retrieves the CryptoHandlerI of this schema.
|
java.lang.String |
getCurrentFolder() |
java.util.List<ScriptImport> |
getDefaultImports() |
java.lang.String |
getDefaultPackage() |
java.util.Map |
getDiscriminators()
Needed between the Entities of a Schema.
|
java.util.List<EntityI> |
getEntitiesForInterface(java.lang.Class clazz)
Returns a list of all entities that implement the given interface.
|
default EntityI |
getEntity(BasicEntityI entityToLookup)
Looks up the passed BasicEntityI in this SchemaI and returns the fitting
EntityI from this SchemaI, i.e. the one with the same name.
|
EntityI |
getEntity(java.lang.String name) |
EntityI |
getEntityForClass(java.lang.Class<? extends BOI> clazz) |
EntityI |
getEntityForClassName(java.lang.String className) |
EntityI |
getEntityForObject(java.lang.Object o) |
java.util.List<EntityI> |
getEntityList() |
static java.lang.String |
getEntityOrAttributeNameValidationError(java.lang.String s)
Validates the given
String as a syntactically valid name for an entity or attribute. |
java.lang.String |
getFingerprint()
Base64 coded SHA-digest of
getSerialVersionUIDs() result. |
FormatterI |
getFormatter()
"format" an object.
|
FormatterI |
getFormatter(java.lang.Object rootObject)
"format" an object.
|
FormatterI |
getFormatter(java.lang.Object rootObject,
java.util.Map objectMap)
"format" an object.
|
FormatterI |
getFormatter(java.lang.Object rootObject,
java.util.Map objectMap,
SchemaI onBehalfOfSchema)
"format" an object.
|
AttributeI[] |
getFrappingAttributes(BOI bo) |
java.util.List<GDPRConfigurationElement> |
getGDPRConfigElements() |
SchemaInterfaceI |
getInterface(java.lang.String name)
Returns the
SchemaInterfaceI for the passed name. |
java.util.Collection<? extends SchemaInterfaceI> |
getInterfaces()
Returns a collection of all interfaces defined in the schema.
|
EntityI |
getLowestCommonDenominateEntity(BOI[] bos) |
AttributeI[] |
getNonPersistentAttributes(BOI bo) |
java.util.List<java.lang.String> |
getPackageList() |
PermissionHandlerI |
getPermissionHandler()
Retrieves the PermissionHandlerI of this schema.
|
java.util.Collection<? extends SchemaInterfaceI> |
getProjectInterfaces()
Returns a collection of all project-specific interfaces defined in the schema.
|
java.lang.String |
getProjectPackage() |
java.lang.String |
getProperty(java.lang.String name) |
java.lang.String |
getProperty(java.lang.String name,
java.lang.String theDefault) |
java.util.Map<java.lang.String,ModuleProvider> |
getRegisteredModuleProviders() |
java.util.Map |
getRelationObjects(java.lang.Object bo,
java.lang.String attPath) |
AbstractScript |
getScript()
Script support for instrumenting etc.
|
AbstractScript |
getScript(java.lang.String language) |
java.lang.String |
getSerializationRelevantDiff(SchemaI another) |
java.lang.String |
getSerialVersionUIDs()
Text with line per entity in the form "entity.fqname':'entity.getSerialVersionUID".
|
AbstractScript |
getSubScript() |
AbstractScript |
getSubScript(java.util.List<ScriptImport> additionalImports) |
AbstractScript |
getSubScript(java.util.List<ScriptImport> additionalImports,
java.lang.Class baseClass) |
AbstractScript |
getSubScript(java.util.List<ScriptImport> additionalImports,
java.lang.Class baseClass,
java.lang.String language) |
AbstractScript |
getSubScript(java.util.List<ScriptImport> additionalImports,
java.lang.String language) |
AbstractScript |
getSubScript(java.lang.String language) |
java.lang.String[] |
getToolTipBundleLookupPath() |
CBOAttributeTypeI |
getType(java.lang.String name)
Type factory.
|
java.util.Map<java.lang.String,java.util.List<Module>> |
getUsedModules() |
java.lang.Object |
getValue(java.lang.Object bo,
AttributeI[] attPath)
Deprecated.
please use
getValue(Object, String) instead, as that one is polymorphic |
java.lang.Object |
getValue(java.lang.Object bo,
java.lang.String attPath)
Setting/getting Values from Objects.
|
java.lang.Object |
getValue(java.lang.Object bo,
java.lang.String attPath,
boolean nullOnPathNull)
Setting/getting Values from Objects.
|
java.lang.Object |
getValue(java.lang.Object bo,
java.lang.String attPath,
boolean nullOnPathNull,
boolean noAttrOnPathNull)
Setting/getting Values from Objects.
|
java.lang.String |
getValueAsString(java.lang.Object bo,
AttributeI[] attPath)
Deprecated.
please use
getValueAsString(Object, String) instead, as that one is polymorphic |
java.lang.String |
getValueAsString(java.lang.Object bo,
java.lang.String attPath)
Setting/getting Values from Objects.
|
java.lang.String |
getValueAsString(java.lang.Object bo,
java.lang.String attPath,
boolean nullIfNullOnPath)
Setting/getting Values from Objects.
|
java.lang.String |
getVersion()
Just version "schema-artikel2008-02-29".
|
boolean |
hasRelationObject(java.lang.Object bo,
java.lang.String attPath,
java.lang.Object toHave) |
default boolean |
isUsingModules()
Returns
true if this SchemaI is using modules. |
static java.util.Map<java.lang.String,java.lang.String> |
parseGuiTips(java.lang.String v)
Parses whitespace-delimited 'variable:value'-pairs stored as a string in GUI tips.
|
static java.util.Map<java.lang.String,java.lang.String> |
parseGuiTips(java.lang.String v,
java.util.Map<java.lang.String,java.lang.String> m)
Parses whitespace-delimited 'variable:value'-pairs stored as a string in GUI tips.
|
void |
releaseDefinitionSource() |
void |
removeRelationObject(java.lang.Object bo,
java.lang.String attPath,
java.lang.Object toRemove) |
void |
setCryptoHandler(CryptoHandlerI ch)
Sets the CryptoHandlerI for this schema.
|
void |
setPermissionHandler(PermissionHandlerI ph)
Sets the PermissionHandlerI for this schema.
|
void |
setProperty(java.lang.String name,
java.lang.String value) |
void |
setValue(java.lang.Object bo,
java.lang.String attPath,
java.lang.Object value)
Setting/getting Values from Objects.
|
void |
setValueAsString(java.lang.Object bo,
java.lang.String attPath,
java.lang.String value)
Setting/getting Values from Objects.
|
void |
setValueAsString(java.lang.Object bo,
java.lang.String attPath,
java.lang.String value,
boolean checkConstraints)
Setting/getting Values from Objects.
|
static java.lang.String[] |
splitInitialDataLine(java.lang.String line)
Helper method to split a given initial data line stored in an EntityI (String) into fields.
|
static final java.lang.String ATT_NAME_DEFAULT_PACKAGE
static final java.lang.String MD_DISABLE
static final java.lang.String MD_NON_DESTRUCTIVE
static final java.lang.String MD_RECREATE_INDEXES
static final int NAME_MINLENGTH
static final java.lang.String RELATION_TYPE_N_1
static final java.lang.String RELATION_TYPE_1_N
static final java.lang.String RELATION_TYPE_N_M
static final char INITIALDATA_LINE_ENCLOSING_CHAR
static final char INITIALDATA_LINE_SEPARATOR_CHAR
static final java.lang.String INITIALDATA_SCHEMA_ADDITIONS_FILENAME
static java.util.Map<java.lang.String,java.lang.String> parseGuiTips(java.lang.String v)
v
- The whitespace-delimited 'variable:value'-pairs as a string.static java.util.Map<java.lang.String,java.lang.String> parseGuiTips(java.lang.String v, java.util.Map<java.lang.String,java.lang.String> m)
null
, a new map will be created.
Note: Some GUI tips may not have the 'variable:value' format, but just a single value. In this case, the value is used key and the value in the map is set to the empty String.
v
- The whitespace-delimited 'variable:value'-pairs as a string.m
- The map to put the key-value pairs into.java.lang.IllegalArgumentException
- if one of the 'variable:value'-pairs contains more than one colonstatic java.lang.String[] splitInitialDataLine(java.lang.String line)
INITIALDATA_LINE_ENCLOSING_CHAR
and INITIALDATA_LINE_SEPARATOR_CHAR
characters.line
- the initial data line to splitnull
if the line is empty or null
static java.lang.String getEntityOrAttributeNameValidationError(java.lang.String s)
String
as a syntactically valid name for an entity or attribute.
A valid name must meet the following criteria:
null
or emptyNAME_MINLENGTH
s
- the String to validatenull
if the name is validstatic void checkSyntacticallyValid(electric.xml.Element el, java.lang.String s, java.lang.String name) throws SchemaDefinitionException
String
represents a syntactically valid name for an entity or attribute.
This method uses getEntityOrAttributeNameValidationError(String)
to perform the validation and throws a
SchemaDefinitionException
if the name is invalid.el
- the Element that the name to check appears ins
- the String to checkname
- the name of the String to checkSchemaDefinitionException
- if the given name is not validjava.lang.String getProperty(java.lang.String name, java.lang.String theDefault)
java.lang.String getProperty(java.lang.String name)
void setProperty(java.lang.String name, java.lang.String value)
java.lang.String getVersion()
java.lang.String getFingerprint()
getSerialVersionUIDs()
result.java.lang.String getSerialVersionUIDs()
java.lang.String getSerializationRelevantDiff(SchemaI another)
java.lang.String flattenToString()
This method creates a flattened, string-based representation of the schema, suitable for transmission
and reconstruction on a remote system. This is crucial for scenarios where services or clients lack a
local schema and need to obtain it from a remote server (e.g., via ServerConnectionI.getRemoteSchema()
).
Important: Keep this method updated whenever the schema XML structure is modified or extended to ensure this mechanism still works!
void releaseDefinitionSource()
java.lang.String[] getToolTipBundleLookupPath()
java.lang.String getProjectPackage()
java.lang.String getDefaultPackage()
java.lang.String getCurrentFolder()
void setCryptoHandler(CryptoHandlerI ch)
CryptoHandlerI getCryptoHandler()
void setPermissionHandler(PermissionHandlerI ph)
PermissionHandlerI getPermissionHandler()
AbstractScript getScript()
AbstractScript getScript(java.lang.String language)
AbstractScript getSubScript()
AbstractScript getSubScript(java.lang.String language)
AbstractScript getSubScript(java.util.List<ScriptImport> additionalImports)
AbstractScript getSubScript(java.util.List<ScriptImport> additionalImports, java.lang.String language)
AbstractScript getSubScript(java.util.List<ScriptImport> additionalImports, java.lang.Class baseClass)
AbstractScript getSubScript(java.util.List<ScriptImport> additionalImports, java.lang.Class baseClass, java.lang.String language)
java.util.List<ScriptImport> getDefaultImports()
ScriptFunctionI createFunction(java.lang.String language, java.lang.String src)
ScriptFunctionI createFunction(java.lang.String language, java.lang.String src, java.lang.String[] parmNames, java.lang.Class[] parmTypes)
ScriptFunctionI createFunction(java.lang.String language, java.lang.String src, java.lang.String[] parmNames, java.lang.Class[] parmTypes, java.lang.Class returnType)
ScriptFunctionI createFunction(java.lang.String language, java.lang.String src, java.lang.String[] parmNames, java.lang.Class[] parmTypes, java.lang.Class returnType, java.lang.String scriptName)
ScriptFunctionI createFunction(java.lang.String language, java.lang.String src, java.lang.String[] parmNames, java.lang.Class[] parmTypes, java.lang.Class returnType, java.lang.String scriptName, java.lang.String functionName)
ScriptFunctionI createFunction(java.lang.String language, java.lang.String src, java.lang.String[] parmNames, java.lang.Class[] parmTypes, java.lang.Class returnType, java.lang.String scriptName, java.lang.String functionName, int lineOffset)
ScriptFunctionI createFunctionFromXML(java.lang.String xml, java.lang.String[] parmNames, java.lang.Class[] parmTypes) throws electric.xml.ParseException
electric.xml.ParseException
ScriptFunctionI createFunctionFromXML(java.lang.String xml, java.lang.String[] parmNames, java.lang.Class[] parmTypes, java.lang.Class returnType) throws electric.xml.ParseException
electric.xml.ParseException
ScriptFunctionI createFunctionFromXML(java.lang.String xml, java.lang.String[] parmNames, java.lang.Class[] parmTypes, java.lang.Class returnType, java.lang.String scriptName, java.lang.String functionName) throws electric.xml.ParseException
electric.xml.ParseException
ScriptFunctionI createFunctionFromXML(java.lang.String xml, java.lang.String[] parmNames, java.lang.Class[] parmTypes, java.lang.Class returnType, java.lang.String scriptName, java.lang.String functionName, int lineOffset) throws electric.xml.ParseException
electric.xml.ParseException
default EntityI getEntity(BasicEntityI entityToLookup)
entityToLookup
- the BasicEntityI we want to look up in this SchemaIEntityI getEntity(java.lang.String name)
EntityI getEntityForClassName(java.lang.String className)
EntityI getEntityForObject(java.lang.Object o)
java.util.List<EntityI> getEntitiesForInterface(java.lang.Class clazz)
This method retrieves all entities within the schema that implement the specified interface.
The provided class must represent an interface; otherwise, an IllegalArgumentException
is thrown.
clazz
- The interface class.java.lang.IllegalArgumentException
- If the provided class is not an interface.java.util.Collection<? extends SchemaInterfaceI> getInterfaces()
SchemaInterfaceI
representing all interfaces in the schema.java.util.Collection<? extends SchemaInterfaceI> getProjectInterfaces()
Project-specific interfaces are those that belong to the current project's package.
SchemaInterfaceI
representing all project-specific interfaces in the schema.java.util.List<GDPRConfigurationElement> getGDPRConfigElements()
java.util.List<EntityI> getEntityList()
java.util.List<java.lang.String> getPackageList()
AttributeI getAttribute(java.lang.Object bo, java.lang.String attPath, boolean noThrow)
AttributeI getAttribute(java.lang.Object bo, java.lang.String attPath)
AttributeI[] getFrappingAttributes(BOI bo)
AttributeI[] getNonPersistentAttributes(BOI bo)
java.lang.Object getValue(java.lang.Object bo, java.lang.String attPath, boolean nullOnPathNull, boolean noAttrOnPathNull)
java.lang.Object getValue(java.lang.Object bo, java.lang.String attPath, boolean nullOnPathNull)
java.lang.Object getValue(java.lang.Object bo, java.lang.String attPath)
java.lang.String getValueAsString(java.lang.Object bo, java.lang.String attPath, boolean nullIfNullOnPath)
java.lang.String getValueAsString(java.lang.Object bo, java.lang.String attPath)
void setValue(java.lang.Object bo, java.lang.String attPath, java.lang.Object value)
void setValueAsString(java.lang.Object bo, java.lang.String attPath, java.lang.String value, boolean checkConstraints)
void setValueAsString(java.lang.Object bo, java.lang.String attPath, java.lang.String value)
AnnotatedValue getAnnotatedValue(java.lang.Object bo, java.lang.String attPath)
AnnotatedValue getAnnotatedValueAsString(java.lang.Object bo, java.lang.String attPath)
java.util.Map getRelationObjects(java.lang.Object bo, java.lang.String attPath)
void addRelationObject(java.lang.Object bo, java.lang.String attPath, java.lang.Object toAdd)
void removeRelationObject(java.lang.Object bo, java.lang.String attPath, java.lang.Object toRemove)
boolean hasRelationObject(java.lang.Object bo, java.lang.String attPath, java.lang.Object toHave)
AggregateFunctionI aggregate(java.lang.String aggregateName, BOI bo, java.lang.String pathlist, java.lang.String parameters)
AggregateFunctionI aggregate(java.lang.String aggregateName, BOI bo, java.lang.String pathlist)
AggregateFunctionI aggregate(AggregateFunctionI a, BOI bo, java.lang.String pathlist)
BOI getClosestAvailableAggregateAnchor(BOI bo, java.lang.String pathlist)
FormatterI getFormatter(java.lang.Object rootObject, java.util.Map objectMap, SchemaI onBehalfOfSchema)
FormatterI getFormatter(java.lang.Object rootObject, java.util.Map objectMap)
FormatterI getFormatter(java.lang.Object rootObject)
FormatterI getFormatter()
java.lang.String describe(java.lang.Object o, java.lang.String formatdef, java.util.Map variables, SchemaI onBehalfOfSchema)
java.lang.String describe(java.lang.Object o, java.lang.String formatdef, java.util.Map variables)
java.lang.String describe(java.lang.Object o, java.lang.String formatdef)
java.lang.String describe(java.lang.Object o)
default java.lang.String describeNE(java.lang.Object o, java.lang.String formatdef, java.util.Map variables, SchemaI onBehalfOfSchema)
default java.lang.String describeNE(java.lang.Object o, java.lang.String formatdef, java.util.Map variables)
default java.lang.String describeNE(java.lang.Object o, java.lang.String formatdef)
default java.lang.String describeNE(java.lang.Object o)
CBOAttributeTypeI getType(java.lang.String name)
SchemaInterfaceI getInterface(java.lang.String name)
SchemaInterfaceI
for the passed name.@Deprecated java.lang.Object getValue(java.lang.Object bo, AttributeI[] attPath)
getValue(Object, String)
instead, as that one is polymorphic@Deprecated java.lang.String getValueAsString(java.lang.Object bo, AttributeI[] attPath)
getValueAsString(Object, String)
instead, as that one is polymorphicjava.util.Map getDiscriminators()
default boolean isUsingModules()
true
if this SchemaI is using modules.java.util.Map<java.lang.String,ModuleProvider> getRegisteredModuleProviders()
java.util.Map<java.lang.String,java.util.List<Module>> getUsedModules()
default java.lang.String[] getBundleLookupPath(java.lang.String bundleName, java.lang.String bundlePostfix)
bundleName
- The base name of the resource bundle.bundlePostfix
- The postfix appended to module-derived paths.Copyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.