All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.fnklabs.draenei.orm.PrimaryKeyMetadata Maven / Gradle / Ivy

There is a newer version: 0.8.3
Show newest version
package com.fnklabs.draenei.orm;

import java.beans.PropertyDescriptor;

class PrimaryKeyMetadata extends ColumnMetadata {
    /**
     * Primary key order
     */
    private final int order;

    /**
     * Flag that can determine if current key is belong to partition keys
     */
    private final boolean isPartitionKey;


    /**
     * @param propertyDescriptor Field property descriptor
     * @param name               Primary key name
     * @param order              Primary key order (from 0 to n) 0 means first
     * @param isPartitionKey     Flag that can determine if current key is belong to partition keys
     * @param type               Field java class type
     */
    public PrimaryKeyMetadata(PropertyDescriptor propertyDescriptor,
                              String name,
                              int order,
                              boolean isPartitionKey,
                              Class type,
                              com.datastax.driver.core.ColumnMetadata columnMetadata) {
        super(propertyDescriptor, type, name, columnMetadata);
        this.order = order;
        this.isPartitionKey = isPartitionKey;
    }

    public int getOrder() {
        return order;
    }

    public boolean isPartitionKey() {
        return isPartitionKey;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy