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

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

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

origin: org.grails/grails-datastore-core

public boolean isVersioned(final EntityAccess ea) {
  if (ea != null && !ea.getPersistentEntity().isVersioned()) {
    return false;
  }
  Class<?> type = ea.getPropertyType(GormProperties.VERSION);
  return Number.class.isAssignableFrom(type) || Date.class.isAssignableFrom(type);
}
origin: org.grails/grails-datastore-gorm

public boolean beforeInsert(final PersistentEntity entity, final EntityAccess ea, PreInsertEvent event) {
  if (entity.isVersioned()) {
    try {
      setVersion(ea);
    }
    catch (RuntimeException e) {
      // TODO
    }
  }
  return invokeEvent(EVENT_BEFORE_INSERT, entity, ea, event);
}    
origin: org.grails/grails-datastore-core

if (propertyName.equals(VERSION) && !entity.isVersioned()) {
  continue;
org.grails.datastore.mapping.modelPersistentEntityisVersioned

Javadoc

Is the entity versioned for optimistic locking.

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
  • getPersistentProperties
    A list of properties to be persisted
  • 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
  • getMappingContext,
  • getReflector,
  • getTenantId,
  • isInitialized,
  • isOwningEntity,
  • isRoot,
  • addOwner,
  • getDecapitalizedName,
  • getDiscriminator

Popular in Java

  • Reactive rest calls using spring rest template
  • getSharedPreferences (Context)
  • getResourceAsStream (ClassLoader)
  • getExternalFilesDir (Context)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • JFrame (javax.swing)
  • JPanel (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top PhpStorm plugins
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