Android Open Source - adme A D M E Index Constraint Config






From Project

Back to project page adme.

License

The source code is released under:

Apache License

If you think the Android project adme listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.danielesegato.adme.config;
//w  w w. j  a  v  a2 s.co m
/**
 * Store the configuration for an index and/or constraint for the annotation {@link com.danielesegato.adme.annotation.ADMEIndexConstraint}.
 */
public class ADMEIndexConstraintConfig {
    private ADMEEntityConfig<?> ADMEEntityConfig;
    private ADMEFieldConfig[] fields;
    private boolean index;
    private String indexName;
    private boolean unique;
    private boolean singleField;

    /**
     * @return the ADME Entity to which this index / constraint is applied
     */
    public ADMEEntityConfig<?> getADMEEntityConfig() {
        return ADMEEntityConfig;
    }

    public void setADMEEntityConfig(ADMEEntityConfig<?> ADMEEntityConfig) {
        this.ADMEEntityConfig = ADMEEntityConfig;
    }

    /**
     * @return the array of fields configurations to which this index/constraint is applied
     */
    public ADMEFieldConfig[] getFields() {
        return fields;
    }

    public void setFields(ADMEFieldConfig[] fields) {
        this.fields = fields;
    }

    /**
     * @return if this configuration define an index on the fields from {@link #getFields()}
     */
    public boolean isIndex() {
        return index;
    }

    public void setIndex(boolean index) {
        this.index = index;
    }

    /**
     * @return the index name on the database, this is returned even if this is not an index
     */
    public String getIndexName() {
        return indexName;
    }

    public void setIndexName(String indexName) {
        this.indexName = indexName;
    }

    /**
     * @return if this configuration define a unique constraint on the fields from {@link #getFields()}
     */
    public boolean isUnique() {
        return unique;
    }

    public void setUnique(boolean unique) {
        this.unique = unique;
    }

    /**
     * @return <em>true</em> if this constraint is applied to a single field, <em>false</em> if
     * applied on multiple fields
     */
    public boolean isSingleField() {
        return singleField;
    }

    public void setSingleField(boolean singleField) {
        this.singleField = singleField;
    }
}




Java Source Code List

com.danielesegato.adme.ADME.java
com.danielesegato.adme.annotation.ADMEEntity.java
com.danielesegato.adme.annotation.ADMEField.java
com.danielesegato.adme.annotation.ADMEIndexConstraint.java
com.danielesegato.adme.config.ADMEConfigUtils.java
com.danielesegato.adme.config.ADMEEntityConfig.java
com.danielesegato.adme.config.ADMEFieldConfig.java
com.danielesegato.adme.config.ADMEIndexConstraintConfig.java
com.danielesegato.adme.config.OnForeignUpdateDelete.java
com.danielesegato.adme.config.SQLiteType.java
com.danielesegato.adme.db.ADMESerializerMapping.java
com.danielesegato.adme.db.ADMESerializer.java
com.danielesegato.adme.db.ContentProviderUris.java
com.danielesegato.adme.db.SQLiteContentProvider.java
com.danielesegato.adme.db.serializer.BaseADMESerializer.java
com.danielesegato.adme.db.serializer.BigDecimalADMESerializer.java
com.danielesegato.adme.db.serializer.BooleanADMESerializer.java
com.danielesegato.adme.db.serializer.BooleanObjectADMESerializer.java
com.danielesegato.adme.db.serializer.CurrencyADMESerializer.java
com.danielesegato.adme.db.serializer.DateAsStringADMESerializer.java
com.danielesegato.adme.db.serializer.DateAsTimestampADMESerializer.java
com.danielesegato.adme.db.serializer.DoubleADMESerializer.java
com.danielesegato.adme.db.serializer.DoubleObjectADMESerializer.java
com.danielesegato.adme.db.serializer.EnumIntADMESerializer.java
com.danielesegato.adme.db.serializer.EnumStringADMESerializer.java
com.danielesegato.adme.db.serializer.IntADMESerializer.java
com.danielesegato.adme.db.serializer.IntObjectADMESerializer.java
com.danielesegato.adme.db.serializer.LongADMESerializer.java
com.danielesegato.adme.db.serializer.LongObjectADMESerializer.java
com.danielesegato.adme.db.serializer.StringADMESerializer.java
com.danielesegato.adme.provider.ADMEContentProviderComponent.java
com.danielesegato.adme.provider.ADMEContentProvider.java
com.danielesegato.adme.utils.DateHelper.java
com.danielesegato.adme.utils.SQLStringHelper.java
com.danielesegato.adme.utils.SQLiteScriptParser.java
com.danielesegato.demo.adme.ADMEDemoMainActivity.java
com.danielesegato.demo.adme.NavigationDrawerFragment.java