public abstract class BasicFinder extends Object implements SimilarObjectFinder
| Constructor and Description |
|---|
BasicFinder()
Creates new BasicFinder
|
| Modifier and Type | Method and Description |
|---|---|
protected static List<Integer> |
findPersistentObjects(MMObjectBuilder builder,
String criterium)
Convenience method: finds MMBase id's for all objects in the
persistent cloud of a given type and satisfying a criterium.
|
List<TmpObject> |
findSimilarObject(Transaction transaction,
TmpObject tmpObj)
Searches for similar object.
|
abstract Collection<Integer> |
getClosePersistentObjects(TmpObject tmpObj)
Gets MMBase id's for all objects from persistent cloud that
might produce a qualifying match with the given object
(possibly including the object itself).
|
abstract Collection<Integer> |
getExactPersistentObjects(TmpObject tmpObj)
Gets MMBase id's for all objects from persistent cloud that
produce an exact match with the given object (possibly
including the object itself).
|
void |
init(HashMap<String,String> params)
Initializes this instance.
|
abstract float |
scoreNode(TmpObject tmpObj1,
TmpObject tmpObj2)
Calculates matching rate for two objects.
|
protected static List<Integer> findPersistentObjects(MMObjectBuilder builder, String criterium)
builder - The builder for this type.criterium - The criterium: SQL where-clause, but
without the "where ".public void init(HashMap<String,String> params)
init in interface SimilarObjectFinderparams - The initialization parameters, provided as
name/value pairs (both String).public List<TmpObject> findSimilarObject(Transaction transaction, TmpObject tmpObj) throws TransactionHandlerException
findSimilarObject in interface SimilarObjectFindertransaction - The transaction.tmpObj - The object to search for.TransactionHandlerException - If a failure occurred.public abstract float scoreNode(TmpObject tmpObj1, TmpObject tmpObj2)
tmpObj1 - The object for which the matching rate is wanted.tmpObj2 - The object to match with.public abstract Collection<Integer> getExactPersistentObjects(TmpObject tmpObj)
tmpObj - The object to match with.public abstract Collection<Integer> getClosePersistentObjects(TmpObject tmpObj)
tmpObj - The object to match with.MMBase 1.9-SNAPSHOT - ${javadoctimestamp}