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

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

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

origin: org.grails/grails-datastore-core

@Override
public boolean isTenantId(PersistentEntity entity, MappingContext context, PropertyDescriptor descriptor) {
  if(entity.isMultiTenant()) {
    Map<String, T> props = entityToPropertyMap.get(entity);
    if(props != null && props.containsKey(GormProperties.TENANT_IDENTITY)) {
      T tenantIdProp = props.get(GormProperties.TENANT_IDENTITY);
      String propertyName = tenantIdProp.getName();
      if(descriptor.getName().equals(propertyName)) {
        return true;
      }
    }
    else {
      return descriptor.getName().equals(GormProperties.TENANT_IDENTITY);
    }
  }
  return false;
}
origin: org.grails/grails-datastore-gorm

if(entity.isMultiTenant()) {
  if(datastore == null) {
    datastore = GormEnhancer.findDatastore(entity.getJavaClass());
AbstractPersistenceEvent preInsertEvent = (AbstractPersistenceEvent) event;
PersistentEntity entity = preInsertEvent.getEntity();
if(entity.isMultiTenant()) {
  TenantId tenantId = entity.getTenantId();
  if(datastore == null) {
origin: org.grails/grails-datastore-gorm-hibernate-core

if(entity.isMultiTenant()) {
  if(hibernateDatastore == null) {
    hibernateDatastore = GormEnhancer.findDatastore(entity.getJavaClass());
AbstractPersistenceEvent preInsertEvent = (AbstractPersistenceEvent) event;
PersistentEntity entity = preInsertEvent.getEntity();
if(entity.isMultiTenant()) {
  TenantId tenantId = entity.getTenantId();
  if(hibernateDatastore == null) {
origin: org.grails/grails-datastore-gorm-hibernate-core

if(referenced != null && referenced.isMultiTenant()) {
  String filterCondition = getMultiTenantFilterCondition(sessionFactoryBeanName, referenced);
  if(filterCondition != null) {
org.grails.datastore.mapping.modelPersistentEntityisMultiTenant

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.
  • 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
  • onCreateOptionsMenu (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSharedPreferences (Context)
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Top plugins for WebStorm
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