| com.atlassian.jira.entity.EntityEngine |
Known Indirect Subclasses
|
Provides methods for working with the DB via Atlassian EntityEngine.
These methods are considered a higher level alternative to the OfBizDelegator and provide two main advantages:
This interface is still experimental at this stage.
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| EntityEngine.SelectFromContext<E> | |||||||||||
| EntityEngine.WhereContext<E> | |||||||||||
| EntityEngine.WhereEqualAndContext<E> | |||||||||||
| EntityEngine.WhereEqualContext<E> | |||||||||||
| EntityEngine.WhereInContext<E> | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new Entity and auto populates the ID if no ID is explicitly set.
| |||||||||||
Creates a new Entity without trying to automatically populate the ID column.
| |||||||||||
Allows you to execute an SQL DELETE using a fluent interface.
| |||||||||||
Allows you to execute an UPDATE statement using a fluent interface.
| |||||||||||
Remove the given entity from the DB.
| |||||||||||
Starts a dialog to run a SELECT query against EntityEngine.
| |||||||||||
Creates a new Entity and auto populates the ID if no ID is explicitly set.
Use this for entities that include an ID column (most of them).
| entityFactory | the EntityFactory |
|---|---|
| newValue | the entity to be created. |
Creates a new Entity without trying to automatically populate the ID column.
Use this for entities that don't have a numeric ID column.
| entityFactory | the EntityFactory |
|---|---|
| newValue | the entity to be created. |
Allows you to execute an SQL DELETE using a fluent interface.
You should call this using code that looks like:
entityEngine.delete(Delete.from(Entity.ISSUE_SECURITY_LEVEL).whereIdEquals(securityLevelId));
or:
entityEngine.delete(
Delete.from(Entity.ISSUE_SECURITY_LEVEL)
.whereEqual("scheme", schemeId)
.andEqual("name", name)
);
| deleteContext | build up a fluent DELETE statement here. Should start with Delete.from( |
|---|
Allows you to execute an UPDATE statement using a fluent interface.
See the Update class for an example.
| updateContext | build up a fluent UPDATE statement here. Should start with Update.into( |
|---|
Remove the given entity from the DB.
| entityFactory | represents the entity type (ie TABLE) |
|---|---|
| id | the id of the row to delete. |
Starts a dialog to run a SELECT query against EntityEngine.
e.g. to run "SELECT * FROM remotelink WHERE id = ?" (and return a single entity value) you could write:
RemoteIssueLink link = entityEngine.selectFrom(Entity.REMOTE_ISSUE_LINK)
.whereEqual("id", remoteIssueLinkId)
.singleValue();
e.g. to run "SELECT * FROM remotelink WHERE issueid = ? AND app = ? ORDER BY type" you could write:
ListremoteIssueLinks = entityEngine.selectFrom(Entity.REMOTE_ISSUE_LINK) .whereEqual("issueid", issueId) .andEqual("app", app) .orderBy("type");
| entityFactory | that can convert GenericValues into Entity data objects. See Entity for existing factories. |
|---|

