For IntelliJ IDEA,
Android Studio or Eclipse



@Override public Object find(Class entityClass, Object key) { EntityMetadata entityMetadata = KunderaMetadataManager.getEntityMetadata(kunderaMetadata, entityClass); Object e = r.db(entityMetadata.getSchema()).table(entityMetadata.getTableName()).get(key).run(connection, entityClass); PropertyAccessorHelper.setId(e, entityMetadata, key); return e; }
private static void setId(Object entity, Object value, EntityMetadata m) { value = PropertyAccessorHelper.fromSourceToTargetClass(m.getIdAttribute().getJavaType(), value.getClass(), value); PropertyAccessorHelper.setId(entity, m, value); } }
/** * Check and set if relation is set via primary key. * * @param relation * relation * @param childObject * target entity * @param childMetadata * target entity metadata * @param entityId * entity id * @return target entity. */ private Object onIfSharedByPK(Relation relation, Object childObject, EntityMetadata childMetadata, Object entityId) { if (relation.isJoinedByPrimaryKey()) { PropertyAccessorHelper.setId(childObject, childMetadata, entityId); } return childObject; }
PropertyAccessorHelper.setId(e, m, generatedId); return generatedId;
PropertyAccessorHelper.setId(result, metadata, key); result = esResponseReader.wrapFindResult(results, entityType, result, metadata, true);
/** * Initialize entity. * * @param key * the key * @param entityMetadata * the entity metadata * @return the object * @throws InstantiationException * the instantiation exception * @throws IllegalAccessException * the illegal access exception */ private Object initializeEntity(Object key, EntityMetadata entityMetadata) throws InstantiationException, IllegalAccessException { Object entity = null; entity = entityMetadata.getEntityClazz().newInstance(); if (key != null) { PropertyAccessorHelper.setId(entity, entityMetadata, key); } return entity; }
PropertyAccessorHelper.setId(e, m, generatedId); return generatedId;
PropertyAccessorHelper.setId(e, m, generatedId); return generatedId;
@Override public Object find(Class entityClass, Object key) { EntityMetadata entityMetadata = KunderaMetadataManager.getEntityMetadata(kunderaMetadata, entityClass); Object e = r.db(entityMetadata.getSchema()).table(entityMetadata.getTableName()).get(key).run(connection, entityClass); PropertyAccessorHelper.setId(e, entityMetadata, key); return e; }
private static void setId(Object entity, Object value, EntityMetadata m) { value = PropertyAccessorHelper.fromSourceToTargetClass(m.getIdAttribute().getJavaType(), value.getClass(), value); PropertyAccessorHelper.setId(entity, m, value); } }
/** * Check and set if relation is set via primary key. * * @param relation * relation * @param childObject * target entity * @param childMetadata * target entity metadata * @param entityId * entity id * @return target entity. */ private Object onIfSharedByPK(Relation relation, Object childObject, EntityMetadata childMetadata, Object entityId) { if (relation.isJoinedByPrimaryKey()) { PropertyAccessorHelper.setId(childObject, childMetadata, entityId); } return childObject; }
/** * Initialize entity. * * @param key * the key * @param entityMetadata * the entity metadata * @return the object * @throws InstantiationException * the instantiation exception * @throws IllegalAccessException * the illegal access exception */ private Object initializeEntity(Object key, EntityMetadata entityMetadata) throws InstantiationException, IllegalAccessException { Object entity = null; entity = entityMetadata.getEntityClazz().newInstance(); if (key != null) { PropertyAccessorHelper.setId(entity, entityMetadata, key); } return entity; }
PropertyAccessorHelper.setId(e, m, generatedId); return generatedId;
PropertyAccessorHelper.setId(e, m, generatedId); return generatedId;
PropertyAccessorHelper.setId(e, m, generatedId); return generatedId;