Package org.eclipse.persistence.descriptors

Examples of org.eclipse.persistence.descriptors.SingleTableMultitenantPolicy


       
        MultitenantPolicy policy;
       
        if (m_type == null || m_type.equals(MultitenantType.SINGLE_TABLE.name()) || m_type.equals(MultitenantType.VPD.name())) {
            if (m_type == null || m_type.equals(MultitenantType.SINGLE_TABLE.name())) {
                policy = new SingleTableMultitenantPolicy(classDescriptor);
               
                // As soon as we find one entity that is multitenant, turn off
                // native SQL queries Users can set the property on their
                // persistence unit if they want it back on. Or per query.
                getProject().setAllowNativeSQLQueries(false);
View Full Code Here


        } else {
            // If we are a multitenant entity and the number of primary key join
            // columns does not equal the number of primary key fields we must
            // add the multitenant primary key tenant discriminator fields.
            if (getDescriptor().hasSingleTableMultitenant() && primaryKeyJoinColumns.size() != getDescriptor().getPrimaryKeyFields().size()) {
                SingleTableMultitenantPolicy policy = (SingleTableMultitenantPolicy) getDescriptor().getClassDescriptor().getMultitenantPolicy();
                Map<DatabaseField, String> tenantFields = policy.getTenantDiscriminatorFields();
               
                // Go through the key sets ...
                for (DatabaseField tenantField : tenantFields.keySet()) {
                    if (tenantField.isPrimaryKey()) {
                        PrimaryKeyJoinColumnMetadata primaryKeyJoinColumn = new PrimaryKeyJoinColumnMetadata();
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.descriptors.SingleTableMultitenantPolicy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.