public class AnnotationLoaderUtil extends Object implements Filter<AnnotationSnapshot>
SnapshotManager
.Modifier and Type | Field and Description |
---|---|
private AnnotationType |
at |
private int |
atId |
private UnitConverter |
converter |
private DbControl |
dc |
private Unit |
defultUnit |
private SnapshotManager |
manager |
private AnnotationSnapshot |
snapshot |
private Unit |
unit |
private String |
unitSymbol |
private Type |
valueType |
Constructor and Description |
---|
AnnotationLoaderUtil(DbControl dc,
SnapshotManager manager,
AnnotationType at)
Create a loder that uses the given snapshot manager to load annotations
for a single annotation type.
|
Modifier and Type | Method and Description |
---|---|
boolean |
evaluate(AnnotationSnapshot snapshot)
Evaluate if the given object should pass the filter or not.
|
boolean |
find(AnnotationSetSnapshot setSnapshot)
Find and load annotations from the given annotation set snapshot.
|
AnnotationType |
getAnnotationType()
The annotation type that this loader load annotations from.
|
int |
getId()
The ID of the annotation type that this loader load annotations from.
|
AnnotationSnapshot |
getSnapshot()
Get the snapshot for the last annotation found when calling
find(AnnotationSetSnapshot) |
Unit |
getUnit()
Get the unit of the last annotation values that was found
by
find(AnnotationSetSnapshot) . |
String |
getUnitSymbol()
Get the unit symbol of the last annotation values that was found
by
find(AnnotationSetSnapshot) . |
List<? extends Serializable> |
getValues()
Get the values from the last annotation found when calling
find(AnnotationSetSnapshot) |
private final DbControl dc
private final SnapshotManager manager
private final AnnotationType at
private final int atId
private final Type valueType
private final Unit defultUnit
private AnnotationSnapshot snapshot
private UnitConverter converter
private Unit unit
private String unitSymbol
public AnnotationLoaderUtil(DbControl dc, SnapshotManager manager, AnnotationType at)
public boolean evaluate(AnnotationSnapshot snapshot)
Filter
evaluate
in interface Filter<AnnotationSnapshot>
snapshot
- The object to evaluatepublic int getId()
public AnnotationType getAnnotationType()
public boolean find(AnnotationSetSnapshot setSnapshot)
public AnnotationSnapshot getSnapshot()
find(AnnotationSetSnapshot)
public List<? extends Serializable> getValues()
find(AnnotationSetSnapshot)
public Unit getUnit()
find(AnnotationSetSnapshot)
.public String getUnitSymbol()
find(AnnotationSetSnapshot)
.