com.bstek.dorado.data.entity
public abstract class EntityUtils extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
copyProperties(java.lang.Object target,
java.lang.Object source) |
static void |
deleteEntity(java.lang.Object entity) |
static boolean |
getBoolean(java.lang.Object entity,
java.lang.String property) |
static AggregationDataType |
getDataType(java.util.Collection<?> entities) |
static EntityDataType |
getDataType(java.lang.Object entity) |
static double |
getDouble(java.lang.Object entity,
java.lang.String property) |
static EntityEnhancer |
getEntityEnhancer(java.lang.Object entity) |
static float |
getFloat(java.lang.Object entity,
java.lang.String property) |
static int |
getInt(java.lang.Object entity,
java.lang.String property) |
static java.lang.Iterable |
getIterable(java.util.Collection entities,
FilterType filterType) |
static <E> java.lang.Iterable<E> |
getIterable(java.util.Collection entities,
FilterType filterType,
java.lang.Class<E> cl) |
static java.util.Iterator |
getIterator(java.util.Collection entities,
FilterType filterType)
返回一个具有筛选功能的数据实体迭代器。
|
static <E> java.util.Iterator<E> |
getIterator(java.util.Collection entities,
FilterType filterType,
java.lang.Class<E> cl) |
static long |
getLong(java.lang.Object entity,
java.lang.String property) |
static boolean |
getOldBoolean(java.lang.Object entity,
java.lang.String property) |
static double |
getOldDouble(java.lang.Object entity,
java.lang.String property) |
static float |
getOldFloat(java.lang.Object entity,
java.lang.String property) |
static int |
getOldInt(java.lang.Object entity,
java.lang.String property) |
static long |
getOldLong(java.lang.Object entity,
java.lang.String property) |
static java.lang.String |
getOldString(java.lang.Object entity,
java.lang.String property) |
static <T> T |
getOldValue(java.lang.Object entity,
java.lang.String property) |
static EntityState |
getState(java.lang.Object entity) |
static java.lang.String |
getString(java.lang.Object entity,
java.lang.String property) |
static <T> T |
getValue(java.lang.Object entity,
java.lang.String property) |
static boolean |
hasOldValues(java.lang.Object entity) |
static boolean |
isCascadeDirty(java.lang.Object entity) |
static boolean |
isDirty(java.lang.Object entity) |
static boolean |
isEntity(java.lang.Object entity) |
static boolean |
isLoaded(java.lang.Object entity,
java.lang.String property) |
static boolean |
isSimpleType(java.lang.Class<?> cl)
判断传入的数据是否是简单的数值类型。
|
static boolean |
isSimpleValue(java.lang.Object data)
判断传入的数据是否是简单的数值。
|
static boolean |
loadIfNecessary(java.lang.Object entity,
java.lang.String property) |
static void |
markDeleted(java.lang.Object entity) |
static <T> T |
newEntity(java.lang.Class<? extends T> type) |
static <T> T |
newEntity(java.lang.Class<? extends T> type,
EntityDataType entityDataType) |
static <T> T |
newEntity(EntityDataType entityDataType) |
static void |
resetEntities(java.util.Collection<?> entities)
重置一组数据实体。
|
static void |
resetEntities(java.util.Collection<?> entities,
boolean lockState) |
static void |
resetEntity(java.lang.Object entity)
重置数据实体。
此操作不仅会重置数据实体为 com.bstek.dorado.data.state.EntityState#NONE ,
同时也将清除先前保存的属性原始值。 |
static void |
resetEntity(java.lang.Object entity,
boolean lockState) |
static void |
setState(java.lang.Object entity,
EntityState state) |
static void |
setValue(java.lang.Object entity,
java.lang.String property,
java.lang.Object value) |
static void |
setValues(java.lang.Object entity,
java.util.Map properties) |
static <T> T |
toEntity(java.lang.Object object) |
static <T> T |
toEntity(java.lang.Object object,
DataType dataType) |
static <T> T |
toPureData(java.lang.Object entity) |
public static boolean isSimpleValue(java.lang.Object data)
public static boolean isSimpleType(java.lang.Class<?> cl)
public static EntityEnhancer getEntityEnhancer(java.lang.Object entity)
public static boolean isEntity(java.lang.Object entity)
public static AggregationDataType getDataType(java.util.Collection<?> entities)
public static EntityDataType getDataType(java.lang.Object entity)
public static EntityState getState(java.lang.Object entity)
public static void setState(java.lang.Object entity, EntityState state)
public static boolean isDirty(java.lang.Object entity)
public static boolean isCascadeDirty(java.lang.Object entity) throws java.lang.Exception
java.lang.Exception
public static <T> T newEntity(java.lang.Class<? extends T> type) throws java.lang.Exception
java.lang.Exception
public static <T> T newEntity(EntityDataType entityDataType) throws java.lang.Exception
java.lang.Exception
public static <T> T newEntity(java.lang.Class<? extends T> type, EntityDataType entityDataType) throws java.lang.Exception
java.lang.Exception
public static void deleteEntity(java.lang.Object entity) throws java.lang.Exception
java.lang.Exception
public static <T> T toEntity(java.lang.Object object) throws java.lang.Exception
java.lang.Exception
public static <T> T toEntity(java.lang.Object object, DataType dataType) throws java.lang.Exception
java.lang.Exception
public static <T> T toPureData(java.lang.Object entity) throws java.lang.Exception
java.lang.Exception
public static void markDeleted(java.lang.Object entity)
public static void resetEntity(java.lang.Object entity)
com.bstek.dorado.data.state.EntityState#NONE
,
同时也将清除先前保存的属性原始值。entity
- 数据实体。public static void resetEntity(java.lang.Object entity, boolean lockState)
public static void resetEntities(java.util.Collection<?> entities)
entities
- 数据实体的集合。resetEntity(Object)
public static void resetEntities(java.util.Collection<?> entities, boolean lockState)
public static java.util.Iterator getIterator(java.util.Collection entities, FilterType filterType)
entities
- 数据实体的集合。filter
- 筛选方式。public static <E> java.util.Iterator<E> getIterator(java.util.Collection entities, FilterType filterType, java.lang.Class<E> cl)
public static java.lang.Iterable getIterable(java.util.Collection entities, FilterType filterType)
public static <E> java.lang.Iterable<E> getIterable(java.util.Collection entities, FilterType filterType, java.lang.Class<E> cl)
public static boolean isLoaded(java.lang.Object entity, java.lang.String property)
public static boolean loadIfNecessary(java.lang.Object entity, java.lang.String property) throws java.lang.Exception
java.lang.Exception
public static <T> T getValue(java.lang.Object entity, java.lang.String property)
public static java.lang.String getString(java.lang.Object entity, java.lang.String property)
public static int getInt(java.lang.Object entity, java.lang.String property)
public static long getLong(java.lang.Object entity, java.lang.String property)
public static float getFloat(java.lang.Object entity, java.lang.String property)
public static double getDouble(java.lang.Object entity, java.lang.String property)
public static boolean getBoolean(java.lang.Object entity, java.lang.String property)
public static void setValue(java.lang.Object entity, java.lang.String property, java.lang.Object value)
public static void setValues(java.lang.Object entity, java.util.Map properties)
public static boolean hasOldValues(java.lang.Object entity)
public static <T> T getOldValue(java.lang.Object entity, java.lang.String property)
public static java.lang.String getOldString(java.lang.Object entity, java.lang.String property)
public static int getOldInt(java.lang.Object entity, java.lang.String property)
public static long getOldLong(java.lang.Object entity, java.lang.String property)
public static float getOldFloat(java.lang.Object entity, java.lang.String property)
public static double getOldDouble(java.lang.Object entity, java.lang.String property)
public static boolean getOldBoolean(java.lang.Object entity, java.lang.String property)
public static void copyProperties(java.lang.Object target, java.lang.Object source) throws java.lang.Exception
java.lang.Exception
Copyright © 2001-2011 www.BSTEK.com All Rights Reserved.