public abstract class AbstractStringType extends CBOAbstractAttributeType
Modifier and Type | Field and Description |
---|---|
static ConfigureInfo |
CONFIG |
OQL_NULL_STRING
INDEX_TYPE_AUTO, INDEX_TYPE_BRIN, INDEX_TYPE_BRIN_FB_BTREE, INDEX_TYPE_BTREE, INDEX_TYPE_CUSTOM, INDEX_TYPE_GIN, INDEX_TYPE_GIN_FB_BTREE, INDEX_TYPE_NONE, INDEX_TYPE_TRIGRAM, INDEX_TYPES, INDEX_TYPES_HR, NO_CUSTOM_INDEX_VERSION
Constructor and Description |
---|
AbstractStringType() |
AbstractStringType(CBOAttributeTypeI base,
electric.xml.Element parms) |
Modifier and Type | Method and Description |
---|---|
void |
applyAdditionalEtters(java.lang.String pn,
nrxgen src,
boolean getterOnly)
Uses nrxgen to generate additional setter and getter methods into the source code for an attribute.
|
java.lang.Object |
castToOwnType(java.lang.Object o)
Tries the best to convert a value of wrong type to the own one.
|
void |
checkConstraints(java.lang.Object value,
java.lang.String typeName)
Checks if the given value (object) matches the constraints (limits,
etc. - if any) set for this type.
|
void |
configure() |
java.lang.String |
formatAsInlineParameter(java.lang.String s)
Converts the passed String s to a String representation our OQL-query-engine can use in the query.
|
java.lang.String |
formatAsInlineParameter(java.lang.String s,
java.lang.String queryQuotationMark)
Converts the passed String s to a String representation our OQL-query-engine can use in the query.
|
java.lang.String |
getAsString(java.lang.Object o) |
java.lang.String |
getCastorFieldType()
From the Castor docs:
"The field element includes an optional attribute called type which can be
used to specify the Java type of the field.
|
java.lang.String |
getCastorSqlType()
From the Castor docs:
"Castor JDO implements automatic type conversion between Java and SQL.
|
java.lang.String |
getDAUType()
User-friendly l10n-ed name for the type, to be used for user interaction.
|
java.lang.String |
getExternalizePostfix()
Used for the Schema serialization/diffs and for the naming of the
read/write externalization methods (of which the standard set is defined in
de.ipcon.db.core.BO).
|
java.lang.Class |
getJavaClass()
The not null type/Class of the field in the Java object (the MyTISM BO).
|
int |
getJdbcType()
Type/Class that the JDBC driver returns for the column/field.
|
java.lang.Integer |
getMaxLength() |
java.lang.Integer |
getMinLength() |
java.util.regex.Pattern |
getPattern() |
java.lang.String |
getSqlType()
SQL column type in the relational database.
|
java.lang.Integer |
getStandardExpectedWidth() |
boolean |
hasAdditionalEtters() |
static void |
initMustMatchPatternDescriptionsBundleLookupPath(SchemaI schema) |
boolean |
isMandatory() |
java.lang.String |
marshal(java.lang.Object o) |
void |
setMaxLength(java.lang.Integer $11) |
void |
setMinLength(java.lang.Integer $10) |
java.lang.Object |
stringToValueWithTypeTip(java.lang.String typeName,
java.lang.String str)
Attempts to parse or transform the given string into a valid value (object) for this data type.
|
java.lang.Object |
stringToValueWithTypeTip(java.lang.String typeName,
java.lang.String str,
boolean skipChecks)
Attempts to parse or transform the given string into a valid value (object) for this data type.
|
java.lang.Object |
unMarshal(java.lang.String s) |
allowsValue, applyCustomExternalization, applySetBOLoaderHook, applySetHook, castToNumber, checkConstraints, compare, compareImpl, getAsString, getAsString, getAsString, getBase, getBool, getCastorCollectionType, getCastorJavaClass, getComponentSqlType, getDef, getDefinition, getExpectedWidth, getFilter, getFloat, getIndexType, getInt, getLong, getNullable, getPositiveInt, getUnique, hasCustomExternalization, hasSetBOLoaderHook, hasSetHook, isCore, isIndexed, marshal, nullable, setAsString, setAsString, setAsString, setBase, setDef, setExpectedWidth, setIndexType, setNullable, setUnique, stringToValue, stringToValue, stringToValue, stringToValue, stringToValueWithTypeTip, stringToValueWithTypeTip, stringToValueWithTypeTip, stringToValueWithTypeTip, toXML, toXMLString
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applyAdditionalEtters, getHumanReadableIndexType, getJavaClassFQNForImport, getJavaClassnameForCode, getName
public static final ConfigureInfo CONFIG
public AbstractStringType()
public AbstractStringType(CBOAttributeTypeI base, electric.xml.Element parms)
public static void initMustMatchPatternDescriptionsBundleLookupPath(SchemaI schema)
public java.util.regex.Pattern getPattern()
public void configure()
configure
in interface CBOAttributeTypeI
configure
in class CBOAbstractAttributeType
public java.lang.String getAsString(java.lang.Object o) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public java.lang.String formatAsInlineParameter(java.lang.String s)
CBOAttributeTypeI
formatAsInlineParameter
in interface CBOAttributeTypeI
formatAsInlineParameter
in class CBOAbstractAttributeType
public java.lang.String formatAsInlineParameter(java.lang.String s, java.lang.String queryQuotationMark)
CBOAttributeTypeI
formatAsInlineParameter
in interface CBOAttributeTypeI
formatAsInlineParameter
in class CBOAbstractAttributeType
public java.lang.Object stringToValueWithTypeTip(java.lang.String typeName, java.lang.String str) throws ValueSettingException
str
- The String value to parse or convert.ValueSettingException
- If parsing or conversion is not possible or if type constraints
are violated.public java.lang.Object stringToValueWithTypeTip(java.lang.String typeName, java.lang.String str, boolean skipChecks) throws ValueSettingException
str
- The String value to parse or convert.skipChecks
- A flag indicating whether to skip type constraint checks.
Use with caution; typically set to true for performance reasons
in specific scenarios (e.g., speed search), but consider
potential consequences.ValueSettingException
- If parsing or conversion is not possible or if type constraints
are violated (unless 'skipChecks' is set to true).public java.lang.Object castToOwnType(java.lang.Object o)
castToOwnType
in interface CBOAttributeTypeI
castToOwnType
in class CBOAbstractAttributeType
public void checkConstraints(java.lang.Object value, java.lang.String typeName) throws ValueSettingException
checkConstraints
in interface CBOAttributeTypeI
checkConstraints
in class CBOAbstractAttributeType
ValueSettingException
public java.lang.String marshal(java.lang.Object o)
public java.lang.Object unMarshal(java.lang.String s)
public java.lang.Class getJavaClass()
CBOAttributeTypeI
public java.lang.String getCastorFieldType()
CBOAttributeTypeI
public java.lang.String getCastorSqlType()
CBOAttributeTypeI
public java.lang.String getSqlType()
CBOAttributeTypeI
public java.lang.String getDAUType()
CBOAttributeTypeI
public int getJdbcType()
CBOAttributeTypeI
public java.lang.Integer getStandardExpectedWidth()
public java.lang.String getExternalizePostfix()
CBOAttributeTypeI
public boolean isMandatory()
isMandatory
in interface CBOAttributeTypeI
isMandatory
in class CBOAbstractAttributeType
public boolean hasAdditionalEtters()
hasAdditionalEtters
in interface CBOAttributeTypeI
hasAdditionalEtters
in class CBOAbstractAttributeType
public void applyAdditionalEtters(java.lang.String pn, nrxgen src, boolean getterOnly)
CBOAttributeTypeI
CBOAttributeTypeI.hasAdditionalEtters()
returns true.
Can be used to generate NN- or special access methods.applyAdditionalEtters
in interface CBOAttributeTypeI
applyAdditionalEtters
in class CBOAbstractAttributeType
pn
- the attribute name to generate the *etters for, nonnull.src
- the nrx generator to extendgetterOnly
- true if the attribute is virtual and readonly, false otherwise. If true, only getter methods
should be generated.public java.lang.Integer getMinLength()
public void setMinLength(java.lang.Integer $10)
public java.lang.Integer getMaxLength()
public void setMaxLength(java.lang.Integer $11)
Copyright © 2000-2024 OAshi S.à r.l. All Rights Reserved.