Class JPADefaultEdmNameBuilder
java.lang.Object
com.sap.olingo.jpa.metadata.core.edm.mapper.impl.JPADefaultEdmNameBuilder
- All Implemented Interfaces:
JPAEdmNameBuilder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildComplexTypeName(javax.persistence.metamodel.EmbeddableType<?> jpaEnbeddedType)EDM Complex Type Name - RULE:EDM EntityContainer Name - RULE:buildEntitySetName(String entityTypeName)EDM EntitySet Name - RULE:buildEntityTypeName(javax.persistence.metamodel.EntityType<?> jpaEntityType)EDM EntityType Name - RULE:buildEnumerationTypeName(Class<? extends Enum<?>> javaEnum)Convert the internal java class name of an enumeration into the external entity data model name.buildNaviPropertyName(javax.persistence.metamodel.Attribute<?,?> jpaAttribute)EDM Navigation Property Name - RULE:buildOperationName(String internalOperationName)Convert the internal name of a java based operation into the external entity data model name.buildPropertyName(String jpaAttributeName)EDM Property Name - RULE:static StringfirstToLower(String substring)static StringfirstToUpper(String jpaAttributeName)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.sap.olingo.jpa.metadata.core.edm.mapper.api.JPAEdmNameBuilder
buildEntitySetName
-
Constructor Details
-
JPADefaultEdmNameBuilder
-
-
Method Details
-
firstToLower
-
firstToUpper
-
buildComplexTypeName
public final String buildComplexTypeName(javax.persistence.metamodel.EmbeddableType<?> jpaEnbeddedType)EDM Complex Type Name - RULE:Use JPA Embeddable Type Simple Name as Complex Type Name
- Specified by:
buildComplexTypeNamein interfaceJPAEdmNameBuilder- Returns:
-
buildContainerName
EDM EntityContainer Name - RULE:The Entity Container Name is build of EDM Namespace + Literal "Container". Container names are simple identifiers, so contain only letter, digits and underscores. However namespaces can contain also dots => eliminate dots and convert to camel case.
- Specified by:
buildContainerNamein interfaceJPAEdmNameBuilder- Returns:
- non empty unique name of an Entity Set
-
buildEntitySetName
EDM EntitySet Name - RULE:Use plural of entity type name. The naming bases on the assumption that English nouns are used.
Entity Set Name = JPA Entity Type Name + Literal "s"- Specified by:
buildEntitySetNamein interfaceJPAEdmNameBuilder- Returns:
- non empty unique name of an Entity Set
-
buildEntityTypeName
EDM EntityType Name - RULE:Use JPA Entity Name as EDM Entity Type Name
- Specified by:
buildEntityTypeNamein interfaceJPAEdmNameBuilder- Returns:
- non empty unique name of an Entity Type
-
getNamespace
- Specified by:
getNamespacein interfaceJPAEdmNameBuilder- Returns:
- name space to a schema
-
buildPropertyName
EDM Property Name - RULE:OData Property Names are represented in Camel Case. The first character of JPA Attribute Name is converted to an UpperCase Character.
- Specified by:
buildPropertyNamein interfaceJPAEdmNameBuilder- Parameters:
jpaAttributeName-- Returns:
-
buildOperationName
Convert the internal name of a java based operation into the external entity data model name.- Specified by:
buildOperationNamein interfaceJPAEdmNameBuilder- Parameters:
internalOperationName-- Returns:
-
buildEnumerationTypeName
Convert the internal java class name of an enumeration into the external entity data model name.- Specified by:
buildEnumerationTypeNamein interfaceJPAEdmNameBuilder- Parameters:
javaEnum-- Returns:
-