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

  • Updating database using SQL prepared statement
  • setContentView (Activity)
  • setScale (BigDecimal)
  • findViewById (Activity)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • JPanel (javax.swing)
  • 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