public class MapType extends Type
Map types fulfil s special role describing localized attributes since each localized attribute must point to a map
type having the Language composed type as argument type and the actual attribute
type as return type.
| Modifier and Type | Class and Description |
|---|---|
static interface |
MapType.MapTypeImpl
Internal persistence layer implementation interface.
|
Type.TypeImplTypeManagerManaged.TypeManagerManagedImplLocalizableItem.LocalizableItemImplExtensibleItem.ExtensibleItemImplItem.AttributeFilter, Item.AttributeMode, Item.CachedGetter, Item.CachedSetter, Item.ItemAttributeMap, Item.ItemConstraint, Item.ItemImpl, Item.JaloCachedComputationException| Modifier and Type | Field and Description |
|---|---|
static String |
ARGUMENT_TYPE
The argument type attribute string constant.
|
static String |
RETURN_TYPE
The element (or return ) type attribute string constant.
|
CODE, DEFAULTVALUE, DESCRIPTION, XMLDEFINITIONAUTOCREATE, DEPRECATED, EXTENSION_NAME, GENERATE, NAMELANGUAGE_FALLBACK_ENABLED_CREATION_TIME_INTERNAL, _MODIFIED_TIME_INTERNAL, accessorLog, CREATION_TIME, DISABLE_ATTRIBUTE_CHECK, DISABLE_ITEMCHECK_BEFORE_REMOVABLE, EVEN, FEATURE_ACCESSMAP_QUALIFIER, INITIAL_CREATION_FLAG, isJaloOnly, MODIFIED_TIME, NEGATIVE, NOT_FOUND, OWNER, PK, POSITIVE, SAVE_FROM_SERVICE_LAYER, staticTransientObjects, TYPEimpl, tenant| Constructor and Description |
|---|
MapType() |
| Modifier and Type | Method and Description |
|---|---|
protected Item |
createItem(SessionContext ctx,
ComposedType type,
Item.ItemAttributeMap allAttributes)
The generic creation method for maptypes.
|
protected static String |
escapeForMap(String raw) |
String |
exportXMLDefinition(XMLOutputter xout) |
Type |
getArgumentType()
Returns the argument type.
|
Type |
getArgumentType(SessionContext ctx)
Returns the argument type.
|
static int[] |
getEscapedMapPositions(String escaped,
int startFrom) |
protected MapType.MapTypeImpl |
getMapTypeImpl()
Internal access to persistence layer implementation.
|
protected Item.ItemAttributeMap |
getNonInitialAttributes(SessionContext ctx,
Item.ItemAttributeMap allAttributes)
Cuts the following attributes which have been already set during creation:
Type.CODE
ARGUMENT_TYPE
RETURN_TYPE
|
Type |
getReturnType()
Returns the element ( or return-) type.
|
Type |
getReturnType(SessionContext ctx)
Returns the element ( or return-) type.
|
String |
getXMLDefinition()
Assembles the XML definition to put inside a
items.xml . |
boolean |
isAssignableFrom(Type type)
Checks if this maptype is assignable from another maptype.
|
boolean |
isInstance(Object o)
Checks if a given object is instance of this maptype.
|
Object |
parseValue(SessionContext ctx,
String value) |
String |
toString()
The string representation of this map type.
|
String |
toString(SessionContext ctx,
Object value) |
boolean |
typeCheckContent(Map map)
Helper method for
isInstance(Object). |
protected static String |
unescapeForMap(String escaped) |
compareTo, getAllDescriptions, getAllDescriptions, getCode, getDefaultValue, getDefaultValue, getDescription, getDescription, getTypeImpl, setAllDescriptions, setAllDescriptions, setDefaultValue, setDefaultValue, setDescription, setDescriptiongetAllNames, getAllNames, getExtensionName, getImpl, getName, getName, isAutocreate, isDeprecated, isGenerate, setAllNames, setAllNames, setAutocreate, setExtensionName, setGenerate, setName, setNamegetAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllValuesSessionContext, getLocalizedProperty, getLocalizedProperty, getLocalizedPropertyInternal, getLocalizedPropertyNames, getLocalizedPropertyNames, hasLanguage, isEmptyValue, isFallbackEnabled, removeLocalizedProperty, removeLocalizedProperty, setAllLocalizedProperties, setAllLocalizedProperties, setLocalizedProperty, setLocalizedPropertycreateNonClassAccessor, getAllProperties, getAllProperties, getProperty, getProperty, getPropertyNames, getPropertyNames, removeProperty, removeProperty, setAllProperties, setAllProperties, setProperty, setPropertyaddLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addNegativePermission, addPermission, addPositivePermission, assureExtensionsLoaded, changeTypeAfterCreation, checkConstraint, checkItemPermission, checkMandatoryAttribute, checkMandatoryAttribute, checkPermission, checkPermission, checkRemovable, clearPermission, ctx, doAfterRemove, doBeforeRemove, equals, getAccessorFor, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributesInternal, getAllLinkedItems, getAndCheckCacheBoundItem, getAttribute, getAttribute, getCacheBoundItem, getComposedType, getComposedTypePK, getCreationTime, getCurrentlyRemovingCount, getDefaultAttributeModes, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItemsCount, getLinkedItemsCount, getLinkedItemsCount, getModificationTime, getNegativePermissions, getOwner, getPermissionMap, getPermissions, getPersistenceVersion, getPK, getPositivePermissions, getRestrictedPrincipals, getSession, getSyncObject, getTenant, getTransientObject, getTransientObjectMap, hashCode, hasRegisteredClassAccessorFor, internal_registerClassAccessorFor, internal_registerNonClassAccessorFor, invalidateLocalCaches, isAlive, isCacheBound, isCurrentlyRemoving, isCurrentlyRemoving, isEmptyRelationValue, isInCreate, isInstanceOf, isItemCheckBeforeRemoveableDisabled, isRelationLocalizationFallbackEnabled, newInstance, notifyExtensionsAfterItemCreation, notifyExtensionsBeforeItemCreation, notifyItemRemoval, readResolve, refreshRemote, registerAccessFor, registerAccessFor, registerJaloInvalidationListeners, remove, remove, removeItemCollection, removeItemCollection, removeLinkedItems, removeLinkedItems, removeLinkedItems, removeLinkedItems, removeLinks, removePartOfItems, removePartOfItems, setAllAttributes, setAllAttributes, setAllAttributesInternal, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAttribute, setAttribute, setAttributeFromString, setAttributeFromString, setCacheBound, setComposedType, setCreationTime, setImplementation, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setModificationTime, setNonInitialAttributes, setOwner, setPermissionsByMap, setTransientObject, setUseTA, useTA, writeReplacegetImplementation, setTenantpublic static final String ARGUMENT_TYPE
public static final String RETURN_TYPE
protected Item createItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) throws JaloBusinessException
The following attributes are required:
createItem in class Itemctx - the current session context which this item is created withintype - the actual item type ( since subtypes may not provide a own jalo class this may be different from the
type which this method was implemented for )JaloBusinessException - indicates an error during creation - any changes will be rollbackedprotected Item.ItemAttributeMap getNonInitialAttributes(SessionContext ctx, Item.ItemAttributeMap allAttributes)
getNonInitialAttributes in class Itemctx - session context with language = NULLallAttributes - a ItemAttributeMap contaning attribute values.ItemAttributeMap containing all attribute values, which belong to non-initial attributes.public static int[] getEscapedMapPositions(String escaped, int startFrom)
public String toString(SessionContext ctx, Object value) throws JaloInvalidParameterException
toString in class TypeJaloInvalidParameterExceptionpublic Object parseValue(SessionContext ctx, String value) throws JaloInvalidParameterException
parseValue in class TypeJaloInvalidParameterExceptionpublic Type getArgumentType()
public Type getArgumentType(SessionContext ctx)
public Type getReturnType()
public Type getReturnType(SessionContext ctx)
public String getXMLDefinition()
items.xml .getXMLDefinition in class Typepublic String exportXMLDefinition(XMLOutputter xout)
exportXMLDefinition in class TypeManagerManagedprotected MapType.MapTypeImpl getMapTypeImpl()
public boolean isAssignableFrom(Type type)
This is true if its argument type is assignable from the other type's argument type and its element type is assignable from the other type's element type.
isAssignableFrom in class Typetype - the type to be checked.public boolean isInstance(Object o)
This is true if the object is a map and each key is instance of the argument type and each value is instance of the element type.
isInstance in class Typeo - the object to be checked.public boolean typeCheckContent(Map map)
isInstance(Object). Checks content of a map if it is compatible with the argument and
element type.Copyright © 2017 SAP SE. All Rights Reserved.