public class CBOSchema extends java.lang.Object implements java.io.Serializable, SchemaI
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CORE_MODULES_SCHEMA_FILENAME |
static java.lang.String |
CORE_SCHEMA_FILENAME |
java.util.Map<java.lang.String,SchemaInterface> |
interfacemap |
static int |
SQL_IDENTIFIER_MAXLENGTH
In PostgreSQL, identifiers — table names, column names, constraint names, etc. —
are limited to a maximum length of 63 bytes.
|
static int |
SQL_TABLE_IDENTIFIER_MAXLENGTH
As PostgreSQL automatically creates a primary key constraint for our entity tables
using the table name with a "_pkey" suffix, we can effectively only use 5 chars less,
i.e. 58 chars, for our table identifiers.
|
java.util.Map |
typemap |
ATT_NAME_DEFAULT_PACKAGE, INITIALDATA_LINE_ENCLOSING_CHAR, INITIALDATA_LINE_SEPARATOR_CHAR, INITIALDATA_SCHEMA_ADDITIONS_FILENAME, MD_DISABLE, MD_NON_DESTRUCTIVE, MD_RECREATE_INDEXES, NAME_MINLENGTH, RELATION_TYPE_1_N, RELATION_TYPE_N_1, RELATION_TYPE_N_M
Constructor and Description |
---|
CBOSchema() |
CBOSchema(electric.xml.Document _doc) |
CBOSchema(electric.xml.Document _doc,
netrexx.lang.Rexx _props) |
CBOSchema(java.io.File f) |
CBOSchema(java.io.File f,
netrexx.lang.Rexx _props) |
CBOSchema(java.io.InputStream is) |
CBOSchema(java.io.InputStream is,
netrexx.lang.Rexx _props) |
CBOSchema(java.net.URL u) |
CBOSchema(java.net.URL u,
netrexx.lang.Rexx _props) |
Modifier and Type | Method and Description |
---|---|
void |
addRelationObject(java.lang.Object bo,
java.lang.String attPath,
java.lang.Object addMe) |
AggregateFunctionI |
aggregate(AggregateFunctionI a,
BOI bo,
java.lang.String pathlist) |
AggregateFunctionI |
aggregate(java.lang.String aname,
BOI bo,
java.lang.String pathlist) |
AggregateFunctionI |
aggregate(java.lang.String aname,
BOI bo,
java.lang.String pathlist,
java.lang.String parameters) |
AggregateFunctionI |
applyAggregateToPath(AggregateFunctionI a,
BOI bo,
java.lang.String[] path) |
AggregateFunctionI |
applyAggregateToPath(AggregateFunctionI a,
BOI bo,
java.lang.String[] path,
int start) |
void |
build(electric.xml.Document _doc)
processes any kind of schema tags (Include, Module, Entity, etc.) found in the provided document
|
void |
build(electric.xml.Document _doc,
boolean _child) |
void |
build(electric.xml.Document _doc,
boolean _child,
boolean ignoreGenerators) |
void |
buildGDPRStructures(electric.xml.Document _doc) |
void |
buildInterfaces(electric.xml.Document _doc) |
void |
buildTypes(electric.xml.Document _doc) |
void |
buildTypes(electric.xml.Document _doc,
boolean _child) |
void |
checkN2MRelationTableSharingAndTableNameLength(java.util.List l) |
static void |
checkSyntacticallyValidSqlEntityTableName(electric.xml.Element el,
java.lang.String s) |
static void |
checkSyntacticallyValidSqlName(electric.xml.Element el,
java.lang.String s,
java.lang.String name)
Checks if the sqlName is syntactically valid
Currently this means:
not null or empty
first character is letter, subsequents are either letters or digits.
|
void |
checkTablenamesUnique(java.util.List l)
Checks that the DB/SQL names for all entities are unique, that is no two entities may share the same table name.
|
ScriptFunctionI |
createFunction(java.lang.String language,
java.lang.String src) |
ScriptFunctionI |
createFunction(java.lang.String language,
java.lang.String src,
java.lang.String[] parmNames) |
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) |
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) |
void |
createNewOrConfigureExistingEntity(electric.xml.Element element,
boolean _child,
java.lang.String keyShort,
java.lang.String keyPlural) |
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.
|
void |
enhanceSchemaForInitialdata(java.io.File buildSchemaDir,
java.lang.String projectSchemaDir,
java.lang.String projectName,
java.lang.String projectPack) |
java.lang.String |
flattenToString()
Generates a normalized string representation of the schema.
|
void |
flushClassCache() |
void |
generate() |
void |
generate(CBOGeneratorI gen) |
void |
generate(java.util.Iterator it) |
void |
generate(java.lang.String n) |
static void |
generateSources(electric.xml.Document _doc,
netrexx.lang.Rexx _t)
Generates the Netrexx sources for the BOs.
|
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.
|
AttributeAccessorBuilder |
getAttributeAccessorBuilder() |
BOI |
getBOForLastPathElement(BOI rootBo,
java.lang.String path) |
BOI |
getClosestAvailableAggregateAnchor(BOI bo,
java.lang.String pathlist) |
CryptoHandlerI |
getCryptoHandler()
Retrieves the CryptoHandlerI of this schema.
|
java.lang.String |
getCurrentFolder() |
java.lang.String |
getDefaultFolder() |
java.util.List<ScriptImport> |
getDefaultImports() |
java.lang.String |
getDefaultPackage() |
java.util.Map |
getDiscriminators()
Needed between the Entities of a Schema.
|
electric.xml.Document |
getDoc() |
java.util.List<EntityI> |
getEntitiesForInterface(java.lang.Class clazzWanted)
Returns a list of all entities that implement the given interface.
|
EntityI |
getEntity(java.lang.String s)
Retrieves the EntityI for the given
String . |
EntityI |
getEntityDisregardingCase(java.lang.String s) |
EntityI |
getEntityForClass(java.lang.Class<? extends BOI> c)
Retrieves the EntityI for the given
Class . |
EntityI |
getEntityForClassName(java.lang.String s)
Retrieves the EntityI with which the given class is associated.
|
CBOEntity |
getEntityForDBName(java.lang.String dbName)
Returns the CBOEntity that has the given db name.
|
EntityI |
getEntityForObject(java.lang.Object o)
Retrieves and returns the associated
EntityI for the given
Object . |
java.util.List<EntityI> |
getEntityList() |
java.lang.String |
getFingerprint()
Base64 coded SHA-digest of
SchemaI.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<BusinessInterest> |
getGDPRBusinessInterests() |
java.util.List<GDPRConfigurationElement> |
getGDPRConfigElements() |
java.util.List<DataCategory> |
getGDPRDataCategories() |
java.util.List<DataRetentionPolicy> |
getGDPRDataRetentionPolicies() |
java.util.List<Law> |
getGDPRLaws() |
java.util.List<ProcessingLegalBasis> |
getGDPRProcessingLegalBases() |
java.util.List<ProcessingPurpose> |
getGDPRProcessingPurposes() |
java.util.List<RetentionPurpose> |
getGDPRRetentionPurposes() |
java.lang.String |
getGeneratedTypeName(java.lang.String _name)
Stellt fest, ob die Klasse _name eine generierte Klasse ist die eigentlich unter anderem
Namen generiert wurde und liefert diesen zurueck.
|
java.util.List |
getGeneratorList() |
static CBOSchema |
getInstanceForJunitTesting(java.lang.String _path) |
static CBOSchema |
getInstanceFromCCL(java.lang.String _path) |
static CBOSchema |
getInstanceFromCCL(java.lang.String _path,
java.util.Map _props) |
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) |
ModuleIntegratorI |
getModuleIntegrator() |
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 p) |
java.lang.String |
getProperty(java.lang.String p,
java.lang.String $default) |
java.util.Map<java.lang.String,ModuleProvider> |
getRegisteredModuleProviders()
returns an unmodifiable Map with all registered module providers as values and their names as keys
|
java.util.Map |
getRelationObjects(java.lang.Object bo,
AttributeI[] attchain)
Deprecated.
please use
getRelationObjects(Object, String) instead, as that one is polymorphic |
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".
|
SQLMappingI |
getSQLMapping() |
int |
getStandardCacheSize() |
static netrexx.lang.Rexx |
getStemByArgs(java.lang.String[] args,
int first)
Parses the command line arguments (starting from number 'first') and
stores the key-value pairs in a Rexx indexed string which is returned.
|
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()
returns an unmodifiable Map with unmodifiable lists of all actually used modules of each used module provider as values and the names of the corresponding module providers as keys
|
java.lang.Object |
getValue(java.lang.Object bo,
AttributeI[] attchain)
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 nullIfNullOnPath)
Setting/getting Values from Objects.
|
java.lang.Object |
getValue(java.lang.Object bo,
java.lang.String attPath,
boolean nullIfNullOnPath,
boolean nullIfAttrMissingOnPath)
Setting/getting Values from Objects.
|
java.lang.String |
getValueAsString(java.lang.Object bo,
AttributeI[] attchain)
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 hasMe) |
java.util.Map |
initBaseTypes() |
void |
initCaches() |
boolean |
initCustomType(java.lang.String _name,
java.lang.String className,
electric.xml.Element _el) |
boolean |
initExtensionType(java.lang.String _name,
java.lang.String _extend,
electric.xml.Element _el) |
void |
initInterface(java.lang.String _name,
electric.xml.Element element) |
static void |
initMustMatchPatternDescriptionsBundleLookupPath(SchemaI schema) |
void |
integrateModules()
integrates all modules being defined in the schema into the project
|
boolean |
isQuiet() |
static void |
main(java.lang.String[] args) |
void |
postprocess()
performs post-processing actions after the schema was read completely at least once;
examples being: verification of the data that was read,
and cross-referencing of data (for relations and inheritance)
|
void |
postprocess(boolean doVerify) |
void |
prepareInitialdata()
integrates all modules being defined in the schema into the project
|
static electric.xml.Document |
readDocument(java.io.File sfile) |
static electric.xml.Document |
readDocument(java.io.InputStream is) |
static electric.xml.Document |
readDocument(java.lang.String file) |
void |
registerGDPRBusinessInterest(BusinessInterest businessInterest) |
void |
registerGDPRDataCategory(DataCategory dataCategory) |
void |
registerGDPRDataRetentionPolicy(DataRetentionPolicy dataRetentionPolicy) |
void |
registerGDPRLaw(Law law) |
void |
registerGDPRProcessingLegalBasis(ProcessingLegalBasis processingLegalBasis) |
void |
registerGDPRProcessingPurpose(ProcessingPurpose processingPurpose) |
void |
registerGDPRRetentionPurpose(RetentionPurpose retentionPurpose) |
void |
registerModule(java.lang.String moduleName,
java.lang.String providerName,
boolean mergeL10n) |
void |
registerModuleProvider(electric.xml.Document _doc,
java.lang.String _pathToProviderDefinition,
java.lang.String providerName) |
static void |
release(FormatterI f) |
void |
releaseDefinitionSource() |
void |
removeRelationObject(java.lang.Object bo,
java.lang.String attPath,
java.lang.Object removeMe) |
void |
setCryptoHandler(CryptoHandlerI ch)
Sets the CryptoHandlerI for this schema.
|
void |
setCurrentFolder(java.lang.String $228) |
void |
setDefaultFolder(java.lang.String $227) |
void |
setDefaultPackage(java.lang.String $225) |
void |
setDiscriminators(java.util.Map $223) |
void |
setDoc(electric.xml.Document $209) |
void |
setGDPRBusinessInterests(java.util.List<BusinessInterest> $215) |
void |
setGDPRDataCategories(java.util.List<DataCategory> $216) |
void |
setGDPRDataRetentionPolicies(java.util.List<DataRetentionPolicy> $217) |
void |
setGDPRLaws(java.util.List<Law> $218) |
void |
setGDPRProcessingLegalBases(java.util.List<ProcessingLegalBasis> $219) |
void |
setGDPRProcessingPurposes(java.util.List<ProcessingPurpose> $220) |
void |
setGDPRRetentionPurposes(java.util.List<RetentionPurpose> $221) |
void |
setGeneratorList(java.util.List $210) |
void |
setModuleIntegrator(ModuleIntegratorI $211) |
void |
setPermissionHandler(PermissionHandlerI ph)
Sets the PermissionHandlerI for this schema.
|
void |
setProjectPackage(java.lang.String $226) |
void |
setProperty(java.lang.String p,
java.lang.String v) |
void |
setQuiet(boolean $224) |
void |
setRegisteredModuleProviders(java.util.Map<java.lang.String,ModuleProvider> $212) |
void |
setSQLMapping(SQLMappingI $214) |
void |
setStandardCacheSize(int $222) |
void |
setUsedModules(java.util.Map<java.lang.String,java.util.List<Module>> $213) |
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.
|
java.lang.String |
toString() |
void |
verifyAndLinkRelationEntities(java.util.List l)
verifies overall Schema consistency
and links relation entities (as all entities have been read at this point)
|
static void |
writeDocument(electric.xml.Document d,
java.io.File f) |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
checkSyntacticallyValid, describeNE, describeNE, describeNE, describeNE, getBundleLookupPath, getEntity, getEntityOrAttributeNameValidationError, isUsingModules, parseGuiTips, parseGuiTips, splitInitialDataLine
public static final int SQL_IDENTIFIER_MAXLENGTH
public static final int SQL_TABLE_IDENTIFIER_MAXLENGTH
public static final java.lang.String CORE_SCHEMA_FILENAME
public static final java.lang.String CORE_MODULES_SCHEMA_FILENAME
public java.util.Map typemap
public java.util.Map<java.lang.String,SchemaInterface> interfacemap
public CBOSchema(java.io.InputStream is)
public CBOSchema(java.io.InputStream is, netrexx.lang.Rexx _props)
public CBOSchema(java.net.URL u)
public CBOSchema(java.net.URL u, netrexx.lang.Rexx _props)
public CBOSchema(java.io.File f)
public CBOSchema(java.io.File f, netrexx.lang.Rexx _props)
public CBOSchema(electric.xml.Document _doc)
public CBOSchema(electric.xml.Document _doc, netrexx.lang.Rexx _props)
public CBOSchema()
public static void checkSyntacticallyValidSqlName(electric.xml.Element el, java.lang.String s, java.lang.String name) throws SchemaDefinitionException
minimum length
SQL_IDENTIFIER_MAXLENGTH
el
- the Element the check is done fors
- the String to checkname
- the name of the String to check, defaults to "sqlName" (optional)EntityDefinitionException
- if the sqlName is not syntactically validSchemaDefinitionException
public static void checkSyntacticallyValidSqlEntityTableName(electric.xml.Element el, java.lang.String s) throws SchemaDefinitionException
SchemaDefinitionException
public void setPermissionHandler(PermissionHandlerI ph)
SchemaI
setPermissionHandler
in interface SchemaI
public PermissionHandlerI getPermissionHandler()
SchemaI
getPermissionHandler
in interface SchemaI
public void setCryptoHandler(CryptoHandlerI ch)
SchemaI
setCryptoHandler
in interface SchemaI
public CryptoHandlerI getCryptoHandler()
SchemaI
getCryptoHandler
in interface SchemaI
public CBOAttributeTypeI getType(java.lang.String _name)
SchemaI
public SchemaInterfaceI getInterface(java.lang.String _name)
SchemaI
SchemaInterfaceI
for the passed name.getInterface
in interface SchemaI
public java.lang.String describe(java.lang.Object o)
SchemaI
public java.lang.String describe(java.lang.Object o, java.lang.String formatdef)
SchemaI
public java.lang.String describe(java.lang.Object o, java.lang.String formatdef, java.util.Map variables)
SchemaI
public java.lang.String describe(java.lang.Object o, java.lang.String formatdef, java.util.Map variables, SchemaI onBehalfOfSchema)
SchemaI
public FormatterI getFormatter()
SchemaI
getFormatter
in interface SchemaI
public FormatterI getFormatter(java.lang.Object _rootObject)
SchemaI
getFormatter
in interface SchemaI
public FormatterI getFormatter(java.lang.Object _rootObject, java.util.Map _objectMap)
SchemaI
getFormatter
in interface SchemaI
public FormatterI getFormatter(java.lang.Object _rootObject, java.util.Map _objectMap, SchemaI _onBehalfOfSchema)
SchemaI
getFormatter
in interface SchemaI
public static void release(FormatterI f)
public AbstractScript getScript()
SchemaI
public AbstractScript getScript(java.lang.String _language)
public java.util.List<ScriptImport> getDefaultImports()
getDefaultImports
in interface SchemaI
public AbstractScript getSubScript()
getSubScript
in interface SchemaI
public AbstractScript getSubScript(java.lang.String language)
getSubScript
in interface SchemaI
public AbstractScript getSubScript(java.util.List<ScriptImport> additionalImports)
getSubScript
in interface SchemaI
public AbstractScript getSubScript(java.util.List<ScriptImport> additionalImports, java.lang.String language)
getSubScript
in interface SchemaI
public AbstractScript getSubScript(java.util.List<ScriptImport> additionalImports, java.lang.Class baseClass)
getSubScript
in interface SchemaI
public AbstractScript getSubScript(java.util.List<ScriptImport> additionalImports, java.lang.Class baseClass, java.lang.String language)
getSubScript
in interface SchemaI
public ScriptFunctionI createFunction(java.lang.String language, java.lang.String src)
createFunction
in interface SchemaI
public ScriptFunctionI createFunction(java.lang.String language, java.lang.String src, java.lang.String[] parmNames)
public ScriptFunctionI createFunction(java.lang.String language, java.lang.String src, java.lang.String[] parmNames, java.lang.Class[] parmTypes)
createFunction
in interface SchemaI
public ScriptFunctionI createFunction(java.lang.String language, java.lang.String src, java.lang.String[] parmNames, java.lang.Class[] parmTypes, java.lang.Class returnType)
createFunction
in interface SchemaI
public 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)
createFunction
in interface SchemaI
public 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)
createFunction
in interface SchemaI
public 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)
createFunction
in interface SchemaI
public ScriptFunctionI createFunctionFromXML(java.lang.String xml, java.lang.String[] parmNames, java.lang.Class[] parmTypes) throws electric.xml.ParseException
createFunctionFromXML
in interface SchemaI
electric.xml.ParseException
public ScriptFunctionI createFunctionFromXML(java.lang.String xml, java.lang.String[] parmNames, java.lang.Class[] parmTypes, java.lang.Class returnType) throws electric.xml.ParseException
createFunctionFromXML
in interface SchemaI
electric.xml.ParseException
public ScriptFunctionI createFunctionFromXML(java.lang.String xml, java.lang.String[] parmNames, java.lang.Class[] parmTypes, java.lang.Class returnType, java.lang.String scriptName) throws electric.xml.ParseException
electric.xml.ParseException
public 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
createFunctionFromXML
in interface SchemaI
electric.xml.ParseException
public 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
createFunctionFromXML
in interface SchemaI
electric.xml.ParseException
public void releaseDefinitionSource()
releaseDefinitionSource
in interface SchemaI
public static void writeDocument(electric.xml.Document d, java.io.File f)
public static electric.xml.Document readDocument(java.lang.String file)
public static electric.xml.Document readDocument(java.io.File sfile)
public static electric.xml.Document readDocument(java.io.InputStream is)
public static void main(java.lang.String[] args)
public static netrexx.lang.Rexx getStemByArgs(java.lang.String[] args, int first)
public static void generateSources(electric.xml.Document _doc, netrexx.lang.Rexx _t)
public static CBOSchema getInstanceForJunitTesting(java.lang.String _path)
public static CBOSchema getInstanceFromCCL(java.lang.String _path)
public static CBOSchema getInstanceFromCCL(java.lang.String _path, java.util.Map _props)
public java.util.Map initBaseTypes()
public boolean initCustomType(java.lang.String _name, java.lang.String className, electric.xml.Element _el)
public boolean initExtensionType(java.lang.String _name, java.lang.String _extend, electric.xml.Element _el)
public void initInterface(java.lang.String _name, electric.xml.Element element)
public void initCaches()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String flattenToString()
SchemaI
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!
flattenToString
in interface SchemaI
public void generate()
public void prepareInitialdata()
public void integrateModules()
public void enhanceSchemaForInitialdata(java.io.File buildSchemaDir, java.lang.String projectSchemaDir, java.lang.String projectName, java.lang.String projectPack)
public void buildTypes(electric.xml.Document _doc)
public void buildTypes(electric.xml.Document _doc, boolean _child)
public void registerModuleProvider(electric.xml.Document _doc, java.lang.String _pathToProviderDefinition, java.lang.String providerName)
public void buildInterfaces(electric.xml.Document _doc)
public void buildGDPRStructures(electric.xml.Document _doc)
public void registerGDPRBusinessInterest(BusinessInterest businessInterest)
public void registerGDPRDataCategory(DataCategory dataCategory)
public void registerGDPRDataRetentionPolicy(DataRetentionPolicy dataRetentionPolicy)
public void registerGDPRLaw(Law law)
public void registerGDPRProcessingLegalBasis(ProcessingLegalBasis processingLegalBasis)
public void registerGDPRProcessingPurpose(ProcessingPurpose processingPurpose)
public void registerGDPRRetentionPurpose(RetentionPurpose retentionPurpose)
public void build(electric.xml.Document _doc)
_doc
- _child
- public void build(electric.xml.Document _doc, boolean _child)
public void build(electric.xml.Document _doc, boolean _child, boolean ignoreGenerators)
public void registerModule(java.lang.String moduleName, java.lang.String providerName, boolean mergeL10n)
public void createNewOrConfigureExistingEntity(electric.xml.Element element, boolean _child, java.lang.String keyShort, java.lang.String keyPlural)
public void verifyAndLinkRelationEntities(java.util.List l)
public void postprocess()
public void postprocess(boolean doVerify)
public void checkN2MRelationTableSharingAndTableNameLength(java.util.List l)
public void checkTablenamesUnique(java.util.List l)
public void generate(java.util.Iterator it)
public void generate(java.lang.String n)
public void generate(CBOGeneratorI gen)
public AttributeAccessorBuilder getAttributeAccessorBuilder()
public java.lang.String getProperty(java.lang.String p)
getProperty
in interface SchemaI
public java.lang.String getProperty(java.lang.String p, java.lang.String $default)
getProperty
in interface SchemaI
public void setProperty(java.lang.String p, java.lang.String v)
setProperty
in interface SchemaI
public EntityI getEntity(java.lang.String s)
String
.public EntityI getEntityDisregardingCase(java.lang.String s)
public CBOEntity getEntityForDBName(java.lang.String dbName)
public EntityI getEntityForClassName(java.lang.String s)
getEntityForClassName
in interface SchemaI
s
- fully qualified classname of the entity to be retrievedEntityResolveException
- if the class is not found or unknownpublic EntityI getEntityForClass(java.lang.Class<? extends BOI> c)
Class
.getEntityForClass
in interface SchemaI
c
- the class of the entity to be retrievedpublic java.util.Collection<? extends SchemaInterfaceI> getInterfaces()
SchemaI
getInterfaces
in interface SchemaI
SchemaInterfaceI
representing all interfaces in the schema.public java.util.Collection<? extends SchemaInterfaceI> getProjectInterfaces()
SchemaI
Project-specific interfaces are those that belong to the current project's package.
getProjectInterfaces
in interface SchemaI
SchemaInterfaceI
representing all project-specific interfaces in the schema.public java.util.List<EntityI> getEntityList()
getEntityList
in interface SchemaI
public java.util.List<GDPRConfigurationElement> getGDPRConfigElements()
getGDPRConfigElements
in interface SchemaI
public void flushClassCache()
public EntityI getEntityForObject(java.lang.Object o)
EntityI
for the given
Object
.getEntityForObject
in interface SchemaI
o
- the object for which the entity is to be retrievedEntityI
associated with the given objectNullHasNoTypeException
- if parameter o is nullEntityResolveException
- if given object is not a BOI
or no
associated EntityI
could be found (FIXME TT 2018-11-27: I'm not
sure in what situations the latter case could actually happen)public java.util.List<EntityI> getEntitiesForInterface(java.lang.Class clazzWanted)
SchemaI
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.
getEntitiesForInterface
in interface SchemaI
clazzWanted
- The interface class.public final AttributeI[] getFrappingAttributes(BOI bo)
getFrappingAttributes
in interface SchemaI
public final AttributeI[] getNonPersistentAttributes(BOI bo)
getNonPersistentAttributes
in interface SchemaI
public void setValueAsString(java.lang.Object bo, java.lang.String attPath, java.lang.String value)
SchemaI
setValueAsString
in interface SchemaI
public void setValueAsString(java.lang.Object bo, java.lang.String attPath, java.lang.String value, boolean _checkConstraints)
SchemaI
setValueAsString
in interface SchemaI
public void setValue(java.lang.Object bo, java.lang.String attPath, java.lang.Object value)
SchemaI
public java.lang.String getValueAsString(java.lang.Object bo, java.lang.String attPath)
SchemaI
getValueAsString
in interface SchemaI
public java.lang.String getValueAsString(java.lang.Object bo, java.lang.String attPath, boolean nullIfNullOnPath)
SchemaI
getValueAsString
in interface SchemaI
public java.lang.Object getValue(java.lang.Object bo, java.lang.String attPath)
SchemaI
public java.lang.Object getValue(java.lang.Object bo, java.lang.String attPath, boolean nullIfNullOnPath)
SchemaI
public java.lang.Object getValue(java.lang.Object bo, java.lang.String attPath, boolean nullIfNullOnPath, boolean nullIfAttrMissingOnPath)
SchemaI
public AnnotatedValue getAnnotatedValue(java.lang.Object bo, java.lang.String attPath)
getAnnotatedValue
in interface SchemaI
public AnnotatedValue getAnnotatedValueAsString(java.lang.Object bo, java.lang.String attPath)
getAnnotatedValueAsString
in interface SchemaI
public AttributeI getAttribute(java.lang.Object bo, java.lang.String attPath)
SchemaI
getAttribute
in interface SchemaI
public AttributeI getAttribute(java.lang.Object bo, java.lang.String attPath, boolean noThrow)
SchemaI
getAttribute
in interface SchemaI
@Deprecated public java.lang.Object getValue(java.lang.Object bo, AttributeI[] attchain)
getValue(Object, String)
instead, as that one is polymorphic@Deprecated public java.lang.String getValueAsString(java.lang.Object bo, AttributeI[] attchain)
getValueAsString(Object, String)
instead, as that one is polymorphicgetValueAsString
in interface SchemaI
@Deprecated public java.util.Map getRelationObjects(java.lang.Object bo, AttributeI[] attchain)
getRelationObjects(Object, String)
instead, as that one is polymorphicpublic java.util.Map getRelationObjects(java.lang.Object bo, java.lang.String attPath)
getRelationObjects
in interface SchemaI
public void addRelationObject(java.lang.Object bo, java.lang.String attPath, java.lang.Object addMe)
addRelationObject
in interface SchemaI
public void removeRelationObject(java.lang.Object bo, java.lang.String attPath, java.lang.Object removeMe)
removeRelationObject
in interface SchemaI
public boolean hasRelationObject(java.lang.Object bo, java.lang.String attPath, java.lang.Object hasMe)
hasRelationObject
in interface SchemaI
public java.lang.String getGeneratedTypeName(java.lang.String _name)
_name
- Der angegebene Name der Klassepublic java.lang.String getVersion()
SchemaI
getVersion
in interface SchemaI
public java.lang.String getSerialVersionUIDs()
SchemaI
getSerialVersionUIDs
in interface SchemaI
public java.lang.String getFingerprint()
SchemaI
SchemaI.getSerialVersionUIDs()
result.getFingerprint
in interface SchemaI
public AggregateFunctionI aggregate(java.lang.String aname, BOI bo, java.lang.String pathlist)
public AggregateFunctionI aggregate(java.lang.String aname, BOI bo, java.lang.String pathlist, java.lang.String parameters)
public AggregateFunctionI aggregate(AggregateFunctionI a, BOI bo, java.lang.String pathlist)
public AggregateFunctionI applyAggregateToPath(AggregateFunctionI a, BOI bo, java.lang.String[] path)
public AggregateFunctionI applyAggregateToPath(AggregateFunctionI a, BOI bo, java.lang.String[] path, int start)
public BOI getClosestAvailableAggregateAnchor(BOI bo, java.lang.String pathlist)
getClosestAvailableAggregateAnchor
in interface SchemaI
public BOI getBOForLastPathElement(BOI rootBo, java.lang.String path)
getBOForLastPathElement
in interface SchemaI
public java.lang.String getSerializationRelevantDiff(SchemaI another)
getSerializationRelevantDiff
in interface SchemaI
public EntityI getLowestCommonDenominateEntity(BOI[] bos)
getLowestCommonDenominateEntity
in interface SchemaI
public java.lang.String[] getToolTipBundleLookupPath()
getToolTipBundleLookupPath
in interface SchemaI
public static void initMustMatchPatternDescriptionsBundleLookupPath(SchemaI schema)
public java.util.List<java.lang.String> getPackageList()
getPackageList
in interface SchemaI
public java.util.Map<java.lang.String,ModuleProvider> getRegisteredModuleProviders()
getRegisteredModuleProviders
in interface SchemaI
public java.util.Map<java.lang.String,java.util.List<Module>> getUsedModules()
getUsedModules
in interface SchemaI
public electric.xml.Document getDoc()
public void setDoc(electric.xml.Document $209)
public java.util.List getGeneratorList()
public void setGeneratorList(java.util.List $210)
public ModuleIntegratorI getModuleIntegrator()
public void setModuleIntegrator(ModuleIntegratorI $211)
public void setRegisteredModuleProviders(java.util.Map<java.lang.String,ModuleProvider> $212)
public void setUsedModules(java.util.Map<java.lang.String,java.util.List<Module>> $213)
public SQLMappingI getSQLMapping()
public void setSQLMapping(SQLMappingI $214)
public java.util.List<BusinessInterest> getGDPRBusinessInterests()
public void setGDPRBusinessInterests(java.util.List<BusinessInterest> $215)
public java.util.List<DataCategory> getGDPRDataCategories()
public void setGDPRDataCategories(java.util.List<DataCategory> $216)
public java.util.List<DataRetentionPolicy> getGDPRDataRetentionPolicies()
public void setGDPRDataRetentionPolicies(java.util.List<DataRetentionPolicy> $217)
public java.util.List<Law> getGDPRLaws()
public void setGDPRLaws(java.util.List<Law> $218)
public java.util.List<ProcessingLegalBasis> getGDPRProcessingLegalBases()
public void setGDPRProcessingLegalBases(java.util.List<ProcessingLegalBasis> $219)
public java.util.List<ProcessingPurpose> getGDPRProcessingPurposes()
public void setGDPRProcessingPurposes(java.util.List<ProcessingPurpose> $220)
public java.util.List<RetentionPurpose> getGDPRRetentionPurposes()
public void setGDPRRetentionPurposes(java.util.List<RetentionPurpose> $221)
public int getStandardCacheSize()
public void setStandardCacheSize(int $222)
public java.util.Map getDiscriminators()
SchemaI
getDiscriminators
in interface SchemaI
public void setDiscriminators(java.util.Map $223)
public boolean isQuiet()
public void setQuiet(boolean $224)
public java.lang.String getDefaultPackage()
getDefaultPackage
in interface SchemaI
public void setDefaultPackage(java.lang.String $225)
public java.lang.String getProjectPackage()
getProjectPackage
in interface SchemaI
public void setProjectPackage(java.lang.String $226)
public java.lang.String getDefaultFolder()
public void setDefaultFolder(java.lang.String $227)
public java.lang.String getCurrentFolder()
getCurrentFolder
in interface SchemaI
public void setCurrentFolder(java.lang.String $228)
Copyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.