Package org.microspace.specific
Class FieldBasedAccessor<T>
- java.lang.Object
-
- org.microspace.specific.FieldBasedAccessor<T>
-
- All Implemented Interfaces:
Accessor<T>
public class FieldBasedAccessor<T> extends Object implements Accessor<T>
A simple object that has only fields can be accessed by this Class.public class { public String id; public BigDecimal price; public String name; }
The first n fields can be specified. The first field has to be the primaryKey.Currently
ThreadId
is not supported.- Version:
- 2012-01-29
- Author:
- gsinai
-
-
Constructor Summary
Constructors Constructor Description FieldBasedAccessor(Class<T> targetClass, int indexedFieldCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
getBlankObject()
GetSetPair<T>
getGetSetPair(String name)
List<GetSetPair<T>>
getGetSetPairs()
protected IndexType
getIndexType(Field field)
GetSetPair<T>
getPartitionIdGetSetPair()
GetSetPair<T>
getPrimaryKeyGetSetPair()
Class<T>
getTargetClass()
GetSetPair<T>
getThreadIdGetSetPair()
boolean
isLocalRecord()
boolean
isUpdatableRecord()
-
-
-
Method Detail
-
getPrimaryKeyGetSetPair
public GetSetPair<T> getPrimaryKeyGetSetPair()
- Specified by:
getPrimaryKeyGetSetPair
in interfaceAccessor<T>
-
getGetSetPairs
public List<GetSetPair<T>> getGetSetPairs()
- Specified by:
getGetSetPairs
in interfaceAccessor<T>
-
getGetSetPair
public GetSetPair<T> getGetSetPair(String name)
- Specified by:
getGetSetPair
in interfaceAccessor<T>
-
getBlankObject
public T getBlankObject()
- Specified by:
getBlankObject
in interfaceAccessor<T>
-
getTargetClass
public Class<T> getTargetClass()
- Specified by:
getTargetClass
in interfaceAccessor<T>
-
getThreadIdGetSetPair
public GetSetPair<T> getThreadIdGetSetPair()
- Specified by:
getThreadIdGetSetPair
in interfaceAccessor<T>
-
getPartitionIdGetSetPair
public GetSetPair<T> getPartitionIdGetSetPair()
- Specified by:
getPartitionIdGetSetPair
in interfaceAccessor<T>
-
isLocalRecord
public boolean isLocalRecord()
- Specified by:
isLocalRecord
in interfaceAccessor<T>
-
isUpdatableRecord
public boolean isUpdatableRecord()
- Specified by:
isUpdatableRecord
in interfaceAccessor<T>
-
-