PropertyAccessorHelper.setId
Code IndexAdd Codota to your IDE (free)

Best code snippets using com.impetus.kundera.property.PropertyAccessorHelper.setId(Showing top 15 results out of 315)

origin: Impetus/Kundera

@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;
}
origin: Impetus/Kundera

  private static void setId(Object entity, Object value, EntityMetadata m)
  {
    value = PropertyAccessorHelper.fromSourceToTargetClass(m.getIdAttribute().getJavaType(), value.getClass(),
        value);
    PropertyAccessorHelper.setId(entity, m, value);
  }
}
origin: Impetus/Kundera

/**
 * 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;
}
origin: Impetus/Kundera

PropertyAccessorHelper.setId(e, m, generatedId);
return generatedId;
origin: Impetus/Kundera

PropertyAccessorHelper.setId(result, metadata, key);
result = esResponseReader.wrapFindResult(results, entityType, result, metadata, true);
origin: impetus-opensource/Kundera

/**
 * 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;
}
origin: impetus-opensource/Kundera

PropertyAccessorHelper.setId(e, m, generatedId);
return generatedId;
origin: Impetus/Kundera

PropertyAccessorHelper.setId(e, m, generatedId);
return generatedId;
origin: impetus-opensource/Kundera

@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;
}
origin: impetus-opensource/Kundera

  private static void setId(Object entity, Object value, EntityMetadata m)
  {
    value = PropertyAccessorHelper.fromSourceToTargetClass(m.getIdAttribute().getJavaType(), value.getClass(),
        value);
    PropertyAccessorHelper.setId(entity, m, value);
  }
}
origin: impetus-opensource/Kundera

/**
 * 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;
}
origin: Impetus/Kundera

/**
 * 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;
}
origin: impetus-opensource/Kundera

PropertyAccessorHelper.setId(e, m, generatedId);
return generatedId;
origin: Impetus/Kundera

PropertyAccessorHelper.setId(e, m, generatedId);
return generatedId;
origin: impetus-opensource/Kundera

PropertyAccessorHelper.setId(e, m, generatedId);
return generatedId;
com.impetus.kundera.propertyPropertyAccessorHelpersetId

Javadoc

Sets Primary Key (Row key) into entity field that was annotated with @Id.

Popular methods of PropertyAccessorHelper

  • getObject
    Gets object from field.
  • set
    Sets a byte-array onto a field.
  • getId
    Get identifier of an entity object by invoking getXXX() method.
  • fromSourceToTargetClass
  • getString
    Gets the string.
  • getGenericClass
    Retrieves Generic class from a collection field that has only one argument.
  • getBytes
  • getGenericClasses
    Retrieves Generic class from a collection field that has only one argument.
  • get
    Gets field value as byte-array.
  • getCollectionInstance
  • toBytes
  • fromDate
  • toBytes,
  • fromDate,
  • getObjectCopy,
  • isCollection,
  • getDeclaredFields,
  • getTypedClass,
  • toClass

Popular classes and methods

  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • putExtra (Intent)
  • runOnUiThread (Activity)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Collectors (java.util.stream)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)