public class MultiNameFactory<N extends MultiNameFactory.Name,AU extends AppUser> extends DataObjectFactory<N> implements NameFinder<N>
AppUser
namesModifier and Type | Class and Description |
---|---|
class |
MultiNameFactory.Name |
DataObjectFactory.AbstractDataObjectInput, DataObjectFactory.AbstractFinder<X>, DataObjectFactory.DataObjectAcceptFilter, DataObjectFactory.DataObjectInput, DataObjectFactory.DataObjectIntegerInput, DataObjectFactory.DestAcceptFilter<T extends DataObject>, DataObjectFactory.FilterAdapter, DataObjectFactory.FilterCounter, DataObjectFactory.FilterExists, DataObjectFactory.FilterIterator, DataObjectFactory.FilterSelector, DataObjectFactory.FilterSet, DataObjectFactory.Finder, DataObjectFactory.MakeRemoteFilterVisitor<R extends DataObject>, DataObjectFactory.MatchFilter, DataObjectFactory.ReferencedAdapter<I extends Indexed>, DataObjectFactory.ReferenceIterator<I extends Indexed>, DataObjectFactory.SortingDataObjectInput, DataObjectFactory.TimeAcceptFilter<T extends DataObject>, DataObjectFactory.TimeFilter
AUTO_CREATE_TABLES_FEATURE, COMPOSITES_SUFFIX, REJECT_MULTIPLE_RESULT_FEATURE, res
Constructor and Description |
---|
MultiNameFactory(AppContext conn,
java.lang.String table) |
Modifier and Type | Method and Description |
---|---|
N |
findFromString(java.lang.String name)
Find an existing entry by name
This should use the same logic as
NameFinder.getStringFinderFilter(String) . |
java.lang.String |
getCanonicalName(N object)
Get a canonical name of an object in a format that can be parsed by the
ParseFactory.findFromString(String) method. |
DataCache<java.lang.String,N> |
getDataCache()
get a DataCache for fetching the target
|
protected TableSpecification |
getDefaultTableSpecification(AppContext c,
java.lang.String table)
Get the default table specification if the table is to be created.
|
java.util.Set<java.lang.String> |
getNames(AU person) |
SQLFilter<AU> |
getPersonFilter(java.lang.String name) |
SQLFilter<N> |
getStringFinderFilter(java.lang.String name)
get a filter than locates the target object from a String.
|
java.lang.Class<N> |
getTarget()
Get a bound on the type of object produced by this factory for run-time checking.
|
protected N |
makeBDO(Repository.Record res)
Construct a new Blank DataObject of the correct Class
This method takes a Record as an argument.
|
N |
makeFromString(java.lang.String name)
Same as
NameFinder.findFromString(String) but attempts to create a matching entry if one does not exist and this
is supported by the implementing class. |
void |
validateNameFormat(java.lang.String name)
Check formatting constraints on the input string.
|
all, allowPreSelect, canCreate, canUpdate, checkComposite, convertToDestinationFilter, customiseForm, equals, exists, find, find, find, find, find, getAllIterator, getComposite, getComposites, getComposites, getConfigTag, getContext, getCount, getDefaultRelationshipFilter, getDefaults, getDestFilter, getExcludeFilter, getFieldConstraints, getFieldHelp, getFilter, getFilter, getFilter, getFinalSelectFilter, getFinalTableSpecification, getFindFilter, getFormCreator, getFormUpdate, getID, getIndex, getInput, getInput, getInput, getLogger, getMaxIdentifierLength, getNullable, getOptional, getOrder, getProperty, getReferenced, getReferenceFieldType, getReferenceFieldType, getRemoteFilter, getRemoteSQLFilter, getResult, getResult, getSelectFilter, getSelector, getSelector, getSelectors, getSupress, getTableSpecification, getTableStructureContributers, getTag, getTranslations, getUniqueIdName, hasComposite, hashCode, isMine, isMine, isMyReference, isValid, makeBDO, makeObject, makeRecord, makeReference, makeReference, matches, narrowSelector, narrowSelector, observeComposite, OrderBy, postCreateTableSetup, postSetContext, release, restrictDefaultInput, setComposites, setContext, setContext, setContextWithMake, setProperty, toString, updateTable
public MultiNameFactory(AppContext conn, java.lang.String table)
protected N makeBDO(Repository.Record res) throws DataFault
DataObjectFactory
makeBDO
in class DataObjectFactory<N extends MultiNameFactory.Name>
res
- Record to create object fromDataFault
public java.lang.Class<N> getTarget()
DataObjectFactory
IndexedProducer.getTarget()
. Normally this method should be overridden
each time we make a sub-class that narrows the produced type. However
checks should still pass if the super-type method is retained.getTarget
in interface IndexedProducer<N extends MultiNameFactory.Name>
getTarget
in interface Targetted<N extends MultiNameFactory.Name>
getTarget
in class DataObjectFactory<N extends MultiNameFactory.Name>
protected TableSpecification getDefaultTableSpecification(AppContext c, java.lang.String table)
DataObjectFactory
getDefaultTableSpecification
in class DataObjectFactory<N extends MultiNameFactory.Name>
c
- AppContexttable
- String table name.public java.lang.String getCanonicalName(N object)
ParseFactory
ParseFactory.findFromString(String)
method.getCanonicalName
in interface ParseFactory<N extends MultiNameFactory.Name>
public void validateNameFormat(java.lang.String name) throws ParseException
NameFinder
validateNameFormat
in interface NameFinder<N extends MultiNameFactory.Name>
ParseException
public N findFromString(java.lang.String name)
NameFinder
NameFinder.getStringFinderFilter(String)
.findFromString
in interface NameFinder<N extends MultiNameFactory.Name>
findFromString
in interface ParseFactory<N extends MultiNameFactory.Name>
public N makeFromString(java.lang.String name) throws DataFault, ParseException
NameFinder
NameFinder.findFromString(String)
but attempts to create a matching entry if one does not exist and this
is supported by the implementing class.makeFromString
in interface NameFinder<N extends MultiNameFactory.Name>
DataFault
ParseException
public SQLFilter<N> getStringFinderFilter(java.lang.String name)
NameFinder
NameFinder.findFromString(String)
getStringFinderFilter
in interface NameFinder<N extends MultiNameFactory.Name>
public java.util.Set<java.lang.String> getNames(AU person)
public DataCache<java.lang.String,N> getDataCache()
NameFinder
getDataCache
in interface NameFinder<N extends MultiNameFactory.Name>