|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.plugins.batchimport.InternalIdMethod
public class InternalIdMethod
Identification method implementation that finds an item
by using the getById()
method.
Field Summary | |
---|---|
static InternalIdMethod |
INTERNAL_ID
Use the internal ID for finding items. |
private String |
method
|
private String |
title
|
Constructor Summary | |
---|---|
InternalIdMethod(String method,
String title)
Create a new id method. |
Method Summary | ||
---|---|---|
|
find(DbControl dc,
ItemQuery<I> query,
String identifier)
Use getById method to find an item. |
|
String |
getColumnMappingParameterName()
|
|
String |
getMethod()
The name of this method, which should be unique among the methods that can be used at a given time. |
|
String |
getTitle()
The display title of the method. |
|
boolean |
isTrulyUnique()
If the identification method is truly unique or not. |
|
|
prepareQuery(DbControl dc,
ItemQuery<I> query)
Return the original query, unmodified. |
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final InternalIdMethod INTERNAL_ID
private final String method
private final String title
Constructor Detail |
---|
public InternalIdMethod(String method, String title)
Method Detail |
---|
public String getMethod()
IdMethod
getMethod
in interface IdMethod
public String getTitle()
IdMethod
getTitle
in interface 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 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 prepare
public <I extends BasicItem> List<I> find(DbControl dc, ItemQuery<I> query, 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 item
IdMethod.isTrulyUnique()
return true
the list is guaranteed to have at most one itempublic String toString()
toString
in class Object
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |