Tabnine Logo
PersistentEntity.getPersistentProperties
Code IndexAdd Tabnine to your IDE (free)

How to use
getPersistentProperties
method
in
org.grails.datastore.mapping.model.PersistentEntity

Best Java code snippets using org.grails.datastore.mapping.model.PersistentEntity.getPersistentProperties (Showing top 11 results out of 315)

origin: org.grails/grails-datastore-gorm-hibernate-core

public Mapping evaluateMapping(PersistentEntity domainClass, Closure<?> defaultMapping, boolean cache) {
  try {
    final Mapping m = (Mapping) domainClass.getMapping().getMappedForm();
    trackCustomCascadingSaves(m, domainClass.getPersistentProperties());
    if (cache) {
      MAPPING_CACHE.put(domainClass.getJavaClass(), m);
    }
    return m;
  } catch (Exception e) {
    throw new DatastoreConfigurationException("Error evaluating ORM mappings block for domain [" +
        domainClass.getName() + "]:  " + e.getMessage(), e);
  }
}
origin: org.grails/grails-datastore-gorm-hibernate-core

protected void configureDerivedProperties(PersistentEntity domainClass, Mapping m) {
  for (PersistentProperty prop : domainClass.getPersistentProperties()) {
    PropertyConfig propertyConfig = m.getPropertyConfig(prop.getName());
    if (propertyConfig != null && propertyConfig.getFormula() != null) {
      propertyConfig.setDerived(true);
    }
  }
}
origin: org.grails/grails-datastore-core

List<PersistentProperty> props = getPersistentEntity().getPersistentProperties();
for (PersistentProperty prop : props) {
  String key = getPropertyKey(prop);
origin: org.grails/grails-datastore-core

List<PersistentProperty> properties = entity.getPersistentProperties();
readers = new PropertyReader[properties.size()];
writers = new PropertyWriter[properties.size()];
origin: org.grails/grails-datastore-core

/**
 * Delete collections before owner delete.
 */
protected void cascadeBeforeDelete(PersistentEntity persistentEntity, EntityAccess entityAccess,
    K key, Object instance) {
  List<PersistentProperty> props = persistentEntity.getPersistentProperties();
  for (PersistentProperty prop : props) {
    String propertyKey = getPropertyKey(prop);
    if (prop instanceof OneToMany) {
      OneToMany oneToMany = (OneToMany)prop;
      if (oneToMany.isOwningSide() && oneToMany.doesCascade(CascadeType.REMOVE)) {
        if (Collection.class.isAssignableFrom(oneToMany.getType())) {
          cascadeDeleteCollection(entityAccess, oneToMany);
        }
      }
    }
    else if (prop instanceof ManyToMany) {
      ManyToMany manyToMany = (ManyToMany)prop;
      if (manyToMany.isOwningSide() && manyToMany.doesCascade(CascadeType.REMOVE)) {
        Object propValue = entityAccess.getProperty(manyToMany.getName());
        if (Collection.class.isAssignableFrom(manyToMany.getType())) {
          cascadeDeleteCollection(entityAccess, manyToMany);
        }
      }
    }
  }
}
origin: org.grails/grails-datastore-gorm-validation

if(entity != null) {
  properties = entity.getPersistentProperties();
  if (properties != null) {
origin: org.grails/grails-datastore-gorm-hibernate-core

final List<PersistentProperty> properties = domainClass.getPersistentProperties();
Table table = component.getOwner().getTable();
PersistentClass persistentClass = component.getOwner();
origin: org.grails/grails-datastore-core

  K key, Object instance) {
List<PersistentProperty> props = persistentEntity.getPersistentProperties();
for (PersistentProperty prop : props) {
  String propertyKey = getPropertyKey(prop);
origin: org.grails/grails-datastore-core

final List<PersistentProperty> props = persistentEntity.getPersistentProperties();
for (final PersistentProperty prop : props) {
  String propKey = getNativePropertyKey(prop);
origin: org.grails/grails-datastore-core

entityAccess.setNativeEntry(e);
final List<PersistentProperty> props = persistentEntity.getPersistentProperties();
final Map<Association, List<Serializable>> toManyKeys = new HashMap<Association, List<Serializable>>();
final Map<OneToMany, Serializable> inverseCollectionUpdates = new HashMap<OneToMany, Serializable>();
origin: org.grails/grails-datastore-core

final List<PersistentProperty> embeddedProperties = associatedEntity.getPersistentProperties();
final EntityAccess embeddedEntityAccess = createEntityAccess(associatedEntity, embeddedInstance);
PersistentProperty identity = associatedEntity.getIdentity();
org.grails.datastore.mapping.modelPersistentEntitygetPersistentProperties

Javadoc

A list of properties to be persisted

Popular methods of PersistentEntity

  • getJavaClass
  • getIdentity
    Returns the identity of the instance
  • getMapping
    Defines the mapping between this persistent entity and an external form
  • getPropertyByName
    Obtains a PersistentProperty instance by name
  • getName
    The entity name including any package prefix
  • getVersion
    Returns the version property.
  • isMultiTenant
  • getAssociations
    A list of the associations for this entity. This is typically a subset of the list returned by #getP
  • getCompositeIdentity
    The composite id
  • getMappingContext
    Obtains the MappingContext where this PersistentEntity is defined
  • getReflector
  • getTenantId
  • getReflector,
  • getTenantId,
  • isInitialized,
  • isOwningEntity,
  • isRoot,
  • isVersioned,
  • addOwner,
  • getDecapitalizedName,
  • getDiscriminator

Popular in Java

  • Reactive rest calls using spring rest template
  • setRequestProperty (URLConnection)
  • setContentView (Activity)
  • requestLocationUpdates (LocationManager)
  • Permission (java.security)
    Legacy security code; do not use.
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • JCheckBox (javax.swing)
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now