Class SchemaAttributeBuilder
- java.lang.Object
-
- org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericBuilder
-
- org.odpi.openmetadata.commonservices.generichandlers.ReferenceableBuilder
-
- org.odpi.openmetadata.commonservices.generichandlers.SchemaAttributeBuilder
-
public class SchemaAttributeBuilder extends ReferenceableBuilder
SchemaAttributeBuilder creates instance properties for a schema attribute.
-
-
Field Summary
-
Fields inherited from class org.odpi.openmetadata.commonservices.generichandlers.ReferenceableBuilder
qualifiedName
-
Fields inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericBuilder
errorHandler, existingClassifications, extendedProperties, instanceStatus, newClassifications, repositoryHelper, serverName, serviceName, templateProperties, typeGUID, typeName
-
-
Constructor Summary
Constructors Constructor Description SchemaAttributeBuilder(String qualifiedName, String displayName, String description, int elementPosition, int minCardinality, int maxCardinality, boolean isDeprecated, String defaultValueOverride, boolean allowsDuplicateValues, boolean orderedValues, int sortOrder, int minimumLength, int length, int significantDigits, boolean isNullable, String nativeJavaClass, List<String> aliases, Map<String,String> additionalProperties, String typeId, String typeName, Map<String,Object> extendedProperties, OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName)Constructor supporting all properties for a schema attribute entity.SchemaAttributeBuilder(String qualifiedName, String displayName, String description, OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName)Template constructorSchemaAttributeBuilder(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName)Template constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InstancePropertiesgetCalculatedValueProperties(String formula, String methodName)Return the schema type properties in an InstanceProperties object.InstancePropertiesgetInstanceProperties(String methodName)Return the supplied bean properties in an InstanceProperties object.SchemaTypeBuildergetSchemaTypeBuilder()Return the schema type builder to the handler to add any extra elements.voidsetSchemaType(String userId, SchemaTypeBuilder schemaTypeBuilder, String methodName)The schema type can be stored in the TypeEmbeddedAttribute classification for the schema attribute entity.-
Methods inherited from class org.odpi.openmetadata.commonservices.generichandlers.ReferenceableBuilder
getQualifiedName, setMemento, setOwnershipClassification, setSecurityTags, setTemplate
-
Methods inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericBuilder
getEntityClassificationProperties, getEntityClassifications, getExistingEntityClassificationHeader, getInstanceProperties, getInstanceStatus, getTypeGUID, getTypeName, setAnchors, setClassification, setEffectivityDates, setEffectivityDates, setLatestChange, setTemplateClassifications, updateInstanceProperties
-
-
-
-
Constructor Detail
-
SchemaAttributeBuilder
public SchemaAttributeBuilder(String qualifiedName, String displayName, String description, OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName)
Template constructor- Parameters:
qualifiedName- unique namedisplayName- new value for the display namedescription- description of the schema attributerepositoryHelper- helper methodsserviceName- name of this OMASserverName- name of local server
-
SchemaAttributeBuilder
public SchemaAttributeBuilder(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName)
Template constructor- Parameters:
repositoryHelper- helper methodsserviceName- name of this OMASserverName- name of local server
-
SchemaAttributeBuilder
public SchemaAttributeBuilder(String qualifiedName, String displayName, String description, int elementPosition, int minCardinality, int maxCardinality, boolean isDeprecated, String defaultValueOverride, boolean allowsDuplicateValues, boolean orderedValues, int sortOrder, int minimumLength, int length, int significantDigits, boolean isNullable, String nativeJavaClass, List<String> aliases, Map<String,String> additionalProperties, String typeId, String typeName, Map<String,Object> extendedProperties, OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName)
Constructor supporting all properties for a schema attribute entity.- Parameters:
qualifiedName- unique namedisplayName- new value for the display name.description- new value for the description.elementPosition- position of the attribute in the parent schemaType.minCardinality- is the attribute optional?maxCardinality- does the attribute repeat?isDeprecated- is this element deprecated?defaultValueOverride- override for the Type's default value.allowsDuplicateValues- unique values ?orderedValues- ordered values ?sortOrder- sort order if orderedminimumLength- minimum length of data in fieldlength- size of data fieldsignificantDigits- number of digits on right of decimal pointisNullable- can the value be null?nativeJavaClass- name of implementation class for Javaaliases- aliases for the fieldadditionalProperties- additional propertiestypeName- name of the type for this schema elementtypeId- unique identifier of the type for this schema elementextendedProperties- properties from the subtype.repositoryHelper- helper methodsserviceName- name of this OMASserverName- name of local server
-
-
Method Detail
-
setSchemaType
public void setSchemaType(String userId, SchemaTypeBuilder schemaTypeBuilder, String methodName) throws InvalidParameterException
The schema type can be stored in the TypeEmbeddedAttribute classification for the schema attribute entity. Depending on the type of schema, the schema type may require additional entities and relationships. The schemaTypeBuilder has this knowledge which is why the schemaTypeBuilder is saved. This method overrides any previously defined TypeEmbeddedAttribute classification for this entity.- Parameters:
userId- calling userschemaTypeBuilder- builder containing the properties of the schema typemethodName- calling method- Throws:
InvalidParameterException- TypeEmbeddedAttribute is not supported in the local repository, or any repository connected by an open metadata repository cohort
-
getSchemaTypeBuilder
public SchemaTypeBuilder getSchemaTypeBuilder()
Return the schema type builder to the handler to add any extra elements.- Returns:
- schema type builder object
-
getCalculatedValueProperties
public InstanceProperties getCalculatedValueProperties(String formula, String methodName)
Return the schema type properties in an InstanceProperties object.- Parameters:
formula- details of how this value is calculatedmethodName- name of the calling method- Returns:
- InstanceProperties object
-
getInstanceProperties
public InstanceProperties getInstanceProperties(String methodName) throws InvalidParameterException
Return the supplied bean properties in an InstanceProperties object.- Overrides:
getInstancePropertiesin classReferenceableBuilder- Parameters:
methodName- name of the calling method- Returns:
- InstanceProperties object
- Throws:
InvalidParameterException- there is a problem with the properties
-
-