Modifier and Type | Field and Description |
---|---|
static InternalIdMethod |
INTERNAL_ID
Use the internal ID for finding items.
|
private java.lang.String |
method |
private java.lang.String |
title |
Constructor and Description |
---|
InternalIdMethod(java.lang.String method,
java.lang.String title)
Create a new id method.
|
Modifier and Type | Method and Description |
---|---|
<I extends BasicItem> |
find(DbControl dc,
ItemQuery<I> query,
java.lang.String identifier)
Use
getById method to find an item. |
java.lang.String |
getColumnMappingParameterName() |
java.lang.String |
getMethod()
The name of this method, which should be unique among the methods that
can be used at a given time.
|
java.lang.String |
getTitle()
The display title of the method.
|
boolean |
isTrulyUnique()
If the identification method is truly unique or not.
|
<I extends BasicItem> |
prepareQuery(DbControl dc,
ItemQuery<I> query)
Return the original query, unmodified.
|
java.lang.String |
toString() |
public static final InternalIdMethod INTERNAL_ID
private final java.lang.String method
private final java.lang.String title
public InternalIdMethod(java.lang.String method, java.lang.String title)
public java.lang.String getMethod()
IdMethod
public java.lang.String getTitle()
IdMethod
public boolean isTrulyUnique()
IdMethod
IdMethod.find(DbControl, ItemQuery, String)
method will
never ever return a list with more than one item.isTrulyUnique
in interface IdMethod
public java.lang.String getColumnMappingParameterName()
getColumnMappingParameterName
in interface IdMethod
public <I extends BasicItem> ItemQuery<I> prepareQuery(DbControl dc, ItemQuery<I> query)
prepareQuery
in interface IdMethod
query
- The query to preparepublic <I extends BasicItem> java.util.List<I> find(DbControl dc, ItemQuery<I> query, java.lang.String identifier)
getById
method to find an item. The query is not
used except to find the type of item to load.find
in interface IdMethod
query
- The query to use, which should have been prepared
using IdMethod.prepareQuery(DbControl, ItemQuery)
identifier
- The identifier of the itemIdMethod.isTrulyUnique()
return true
the list is guaranteed to have at most one itempublic java.lang.String toString()
toString
in class java.lang.Object