Package org.eclipse.persistence.descriptors.partitioning

Examples of org.eclipse.persistence.descriptors.partitioning.ValuePartitioningPolicy


     * INTERNAL:
     * Build/process the partitioning policy.
     */
    @Override
    public PartitioningPolicy buildPolicy() {
        ValuePartitioningPolicy policy = new ValuePartitioningPolicy();
        super.buildPolicy(policy);
       
        // Set the partition value type name. Will be used to initialize the
        // individual partition values.
        policy.setPartitionValueTypeName(getPartitionValueType().getName());

        // Set the default connection pool.
        policy.setDefaultConnectionPool(this.defaultConnectionPool);
       
        // Set only the partition value names (they will be initialized at runtime).
        for (ValuePartitionMetadata partition : getPartitions()) {
            policy.addPartitionName(partition.getValue(), partition.getConnectionPool());
        }
       
        return policy;
    }
View Full Code Here


    /**
     * INTERNAL:
     */
    @Override
    public PartitioningPolicy buildPolicy() {
        ValuePartitioningPolicy policy = new ValuePartitioningPolicy();
        super.buildPolicy(policy);
        Class type = String.class;
        if (this.partitionValueType != null) {
            type = getJavaClass(getMetadataClass(this.partitionValueType));
        }
        policy.setDefaultConnectionPool(this.defaultConnectionPool);
        for (ValuePartitionMetadata partition : getPartitions()) {
            Object value = initObject(type, partition.getValue());
            if (policy.getPartitions().containsKey(value)) {
                throw ValidationException.duplicatePartitionValue(getName(), value);
            }
            policy.addPartition(value, partition.getConnectionPool());
        }
        return policy;
    }
View Full Code Here

     * INTERNAL:
     * Build/process the partitioning policy.
     */
    @Override
    public PartitioningPolicy buildPolicy() {
        ValuePartitioningPolicy policy = new ValuePartitioningPolicy();
        super.buildPolicy(policy);
       
        // Set the partition value type name. Will be used to initialize the
        // individual partition values.
        policy.setPartitionValueTypeName(getPartitionValueType().getName());

        // Set the default connection pool.
        policy.setDefaultConnectionPool(this.defaultConnectionPool);
       
        // Set only the partition value names (they will be initialized at runtime).
        for (ValuePartitionMetadata partition : getPartitions()) {
            policy.addPartitionName(partition.getValue(), partition.getConnectionPool());
        }
       
        return policy;
    }
View Full Code Here

        return ConversionManager.getDefaultManager().convertObject(value, type);
    }

    @Override
    public PartitioningPolicy buildPolicy() {
        ValuePartitioningPolicy policy = new ValuePartitioningPolicy();
        super.buildPolicy(policy);
        Class type = String.class;
        if (this.partitionValueType != null) {
            type = getJavaClass(getMetadataClass(this.partitionValueType));
        }
        policy.setDefaultConnectionPool(this.defaultConnectionPool);
        for (ValuePartitionMetadata partition : getPartitions()) {
            Object value = initObject(type, partition.getValue());
            if (policy.getPartitions().containsKey(value)) {
                throw ValidationException.duplicatePartitionValue(getName(), value);
            }
            policy.addPartition(value, partition.getConnectionPool());
        }
        return policy;
    }
View Full Code Here

     * INTERNAL:
     * Build/process the partitioning policy.
     */
    @Override
    public PartitioningPolicy buildPolicy() {
        ValuePartitioningPolicy policy = new ValuePartitioningPolicy();
        super.buildPolicy(policy);
       
        // Set the partition value type name. Will be used to initialize the
        // individual partition values.
        policy.setPartitionValueTypeName(getPartitionValueType().getName());

        // Set the default connection pool.
        policy.setDefaultConnectionPool(this.defaultConnectionPool);
       
        // Set only the partition value names (they will be initialized at runtime).
        for (ValuePartitionMetadata partition : getPartitions()) {
            policy.addPartitionName(partition.getValue(), partition.getConnectionPool());
        }
       
        return policy;
    }
View Full Code Here

     * INTERNAL:
     * Build/process the partitioning policy.
     */
    @Override
    public PartitioningPolicy buildPolicy() {
        ValuePartitioningPolicy policy = new ValuePartitioningPolicy();
        super.buildPolicy(policy);
       
        // Set the partition value type name. Will be used to initialize the
        // individual partition values.
        policy.setPartitionValueTypeName(getPartitionValueType().getName());

        // Set the default connection pool.
        policy.setDefaultConnectionPool(this.defaultConnectionPool);
       
        // Set only the partition value names (they will be initialized at runtime).
        for (ValuePartitionMetadata partition : getPartitions()) {
            policy.addPartitionName(partition.getValue(), partition.getConnectionPool());
        }
       
        return policy;
    }
View Full Code Here

        return ConversionManager.getDefaultManager().convertObject(value, type);
    }

    @Override
    public PartitioningPolicy buildPolicy() {
        ValuePartitioningPolicy policy = new ValuePartitioningPolicy();
        super.buildPolicy(policy);
        Class type = String.class;
        if (this.partitionValueType != null) {
            type = getJavaClass(getMetadataClass(this.partitionValueType));
        }
        policy.setDefaultConnectionPool(this.defaultConnectionPool);
        for (ValuePartitionMetadata partition : getPartitions()) {
            Object value = initObject(type, partition.getValue());
            if (policy.getPartitions().containsKey(value)) {
                throw ValidationException.duplicatePartitionValue(getName(), value);
            }
            policy.addPartition(value, partition.getConnectionPool());
        }
        return policy;
    }
View Full Code Here

     * INTERNAL:
     * Build/process the partitioning policy.
     */
    @Override
    public PartitioningPolicy buildPolicy() {
        ValuePartitioningPolicy policy = new ValuePartitioningPolicy();
        super.buildPolicy(policy);
       
        // Set the partition value type name. Will be used to initialize the
        // individual partition values.
        policy.setPartitionValueTypeName(getPartitionValueType().getName());

        // Set the default connection pool.
        policy.setDefaultConnectionPool(this.defaultConnectionPool);
       
        // Set only the partition value names (they will be initialized at runtime).
        for (ValuePartitionMetadata partition : getPartitions()) {
            policy.addPartitionName(partition.getValue(), partition.getConnectionPool());
        }
       
        return policy;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.descriptors.partitioning.ValuePartitioningPolicy

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.