Package gov.niem.tools.api.db.property
Class PropertyService
java.lang.Object
gov.niem.tools.api.db.base.BaseEntityService<Property>
gov.niem.tools.api.db.base.BaseVersionEntityService<Property>
gov.niem.tools.api.db.component.ComponentService<Property,PropertyRepository>
gov.niem.tools.api.db.property.PropertyService
Operations supporting properties.
-
Field Summary
Fields inherited from class gov.niem.tools.api.db.component.ComponentService
namespaceService, repo, versionService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a property to the database with the given name to the given namespace.Adds a property to the database with the given name and definition to the given namespace.Adds a property to the database with the given name to the namespace with the given prefix and version.Adds a property to the database with the given name to the namespace with the given namespace fields.longcountByNamespace(String stewardKey, String modelKey, String versionNumber, String prefix, Property.Category category) Count all properties in a namespace with the given fields.longcountByVersion(String stewardKey, String modelKey, String versionNumber, Property.Category category) Count all properties in a version with the given fields.org.springframework.data.domain.Page<Property> getPropertiesOfType(Type type, org.springframework.data.domain.Pageable pageable) Get a page of properties of the type with the given fields.getSubstitutionGroups(String stewardKey, String modelKey, String versionNumber, String qname) Get a list of substitution group heads for the property with the given fields.getSubstitutions(String stewardKey, String modelKey, String versionNumber, String qname) Get a list of substitutions for the property with the given fields.Methods inherited from class gov.niem.tools.api.db.component.ComponentService
add, add, add, add, add, add, assertRequiredLocalFields, assertUnique, countByNamespace, countByVersion, findByKeyword, findByNamespace, findByVersion, findOne, findOne, findOne, findOne, findOneOptional, findOneOptional, findOneOptional, getQualifiedName, getQualifiedPrefix, repositoryMethods inherited from class gov.niem.tools.api.db.base.BaseVersionEntityService
getHistory, getNext, getPrevMethods inherited from class gov.niem.tools.api.db.base.BaseEntityService
assertFieldNotNullAndNotEmpty, count, delete, edit, findOneOptional, getEntityClassName, getNotFoundException, loadId, merge, saveExisting, saveNew, throwNotFound, throwNotFound, throwNotFound, throwNotUnique, throwNotUnique, throwNotUnique
-
Constructor Details
-
PropertyService
public PropertyService()
-
-
Method Details
-
add
public Property add(String stewardKey, String modelKey, String versionNumber, String prefix, String name) throws Exception Adds a property to the database with the given name to the namespace with the given namespace fields.- Throws:
Exception
-
add
Adds a property to the database with the given name to the namespace with the given prefix and version.- Throws:
Exception
-
add
Adds a property to the database with the given name to the given namespace.- Throws:
Exception
-
add
Adds a property to the database with the given name and definition to the given namespace.- Throws:
Exception
-
countByVersion
public long countByVersion(String stewardKey, String modelKey, String versionNumber, Property.Category category) throws EntityNotFoundException Count all properties in a version with the given fields.- Throws:
EntityNotFoundException
-
countByNamespace
public long countByNamespace(String stewardKey, String modelKey, String versionNumber, String prefix, Property.Category category) throws EntityNotFoundException Count all properties in a namespace with the given fields.- Throws:
EntityNotFoundException
-
getSubstitutions
public List<Property> getSubstitutions(String stewardKey, String modelKey, String versionNumber, String qname) throws EntityNotFoundException Get a list of substitutions for the property with the given fields.- Throws:
EntityNotFoundException
-
getSubstitutionGroups
public List<Property> getSubstitutionGroups(String stewardKey, String modelKey, String versionNumber, String qname) throws EntityNotFoundException Get a list of substitution group heads for the property with the given fields.Note that there is usually only a single substitution group head for a substitutable property, but occasionally there can be a chain of substitutions.
- Throws:
EntityNotFoundException
-
getPropertiesOfType
public org.springframework.data.domain.Page<Property> getPropertiesOfType(Type type, org.springframework.data.domain.Pageable pageable) throws EntityNotFoundException Get a page of properties of the type with the given fields.- Throws:
EntityNotFoundException
-