java.lang.Object | |
↳ | com.atlassian.jira.entity.property.JsonEntityPropertyManagerImpl |
Low-level database API for accessing JSON entity properties.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | MAXIMUM_ENTITY_NAME_LENGTH | If you any of these change these values, please update the JavaDocs for
put(String, Long, String, String) and
getMaximumValueLength() accordingly. |
|||||||||
int | MAXIMUM_KEY_LENGTH | ||||||||||
int | MAXIMUM_VALUE_LENGTH |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Counts the number of properties that match the given entity.
| |||||||||||
Counts the number of properties that match the given entity name and property key.
| |||||||||||
Deletes the stored value for an entity property, if it exists.
| |||||||||||
Deletes all properties that are associated with the provided entity.
| |||||||||||
Deletes all properties that are associated with the provided entity name and
property key.
| |||||||||||
Returns whether or not a given property exists.
| |||||||||||
Produces a list of entity property keys that match the provided entity name and key prefix.
| |||||||||||
Produces a list of entity property keys that match the provided entity name and entity id.
| |||||||||||
Look up an entity property by the entity name, entity id, and property key.
| |||||||||||
The maximum allowed length (in characters) permitted for the
String json value
when calling put(String, Long, String, String) (or putDryRun(String, String, String) ). | |||||||||||
Set the value for an entity property, creating, updating, or deleting it as necessary.
| |||||||||||
Performs all of the validation that would be performed during a
put(String, Long, String, String)
request, but does not actually store the value. | |||||||||||
Returns a query object for finding, counting, or deleting properties with various restrictions.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.atlassian.jira.entity.property.JsonEntityPropertyManager
|
If you any of these change these values, please update the JavaDocs for
put(String, Long, String, String)
and
getMaximumValueLength()
accordingly.
Counts the number of properties that match the given entity.
This convenience method is exactly equivalent to:
query()
.entityName(entityName)
.entityId(entityId)
.count()
entityName | the entity name of the owning entity |
---|---|
entityId | the entity ID of the owning entity |
Counts the number of properties that match the given entity name and property key.
This convenience method is exactly equivalent to:
query()
.entityName(entityName)
.key(key)
.count()
entityName | the entity name of the owning entities |
---|---|
key | the property key to look for |
Deletes the stored value for an entity property, if it exists.
entityName | the entity name of the property to be deleted |
---|---|
entityId | the entity ID of the property to be deleted |
key | the key of the property to be deleted |
Deletes all properties that are associated with the provided entity.
This convenience method is exactly equivalent to:
query()
.entityName(entityName)
.entityId(entityId)
.delete()
entityName | the entity name for the properties |
---|---|
entityId | the entity ID for the properties |
Deletes all properties that are associated with the provided entity name and
property key.
This convenience method is exactly equivalent to:
query()
.entityName(entityName)
.key(key)
.delete()
entityName | the entity name for the properties |
---|---|
key | the property key for the properties |
Returns whether or not a given property exists. This convenience method is equivalent
to get(String, Long, String)
!= null
, but does not actually retrieve
the JSON data from the database, so it may have better performance characteristics when
the JSON content is not needed.
entityName | the entity name for the property |
---|---|
entityId | the entity ID for the property |
key | the key for the property |
Produces a list of entity property keys that match the provided entity name and key prefix.
This convenience method is exactly equivalent to:
query()
.entityName(entityName)
.keyPrefix(keyPrefix)
.findDistinctKeys()
entityName | the entity name for the entities that are associated with the properties. |
---|---|
keyPrefix | the prefix to apply for limiting which keys are returned; must not be
null or a blank string |
Produces a list of entity property keys that match the provided entity name and entity id.
This convenience method is exactly equivalent to:
query()
.entityName(entityName)
.entityId(entityId)
.findKeys()
entityName | the entity name for the entities that are associated with the properties. |
---|---|
entityId | the id of the entity. |
Look up an entity property by the entity name, entity id, and property key.
entityName | the entity name of the property |
---|---|
entityId | the entity ID of the property |
key | the key of the property |
null
if the property does not exist.
The maximum allowed length (in characters) permitted for the String json
value
when calling put(String, Long, String, String)
(or putDryRun(String, String, String)
).
This value is currently 32,768
, but this may change in the future.
Set the value for an entity property, creating, updating, or deleting it as necessary.
entityName | the entity name for the property (maximum length 255 ). As explained in the
class documentation , this value should be unique to the service
creating the properties and will generally not be the same as the entity to
which the properties are attached. |
---|---|
entityId | the entity ID for the property. In general, this will be the same as the ID of the
owning entity; for example, the
RemoteVersionLinkService
uses the version ID for this value. |
key | the key for the property (maximum length 255 ). This value should generally be suitable
for a reverse lookup when the same data might be associated with multiple entities. For example, the
RemoteVersionLinkService
uses the global ID of the remote object, which is the same identifier used by applinks to identify
a Confluence page, Bamboo project, etc. |
json | the new value for the property, or null to delete it (maximum length
is available by calling getMaximumValueLength() ) |
Performs all of the validation that would be performed during a put(String, Long, String, String)
request, but does not actually store the value.
entityName | as for put(String, Long, String, String) |
---|---|
key | as for put(String, Long, String, String) |
json | as for put(String, Long, String, String) |
Returns a query object for finding, counting, or deleting properties with various restrictions.
See EntityPropertyQuery
for usage and minimum requirements.