/**
 *  Generated with Tigerstripe(tm) Tigerstripe Workbench Feature 2.2.0.v20070419-1556-GFEkmUll2-0111E.
 *
 *  Tigerstripe(tm) is a registered trademark of Tigerstripe, Inc.
 *
 *  Plugin  : Sun Microsystems Inc./SunJavaSpecificationPlugin(1.0) (1.0)
 *
 *  DO NOT EDIT THIS CODE WAS AUTOMATICALLY GENERATED
 *
 *  Generated from source Tigerstipe Artifact :
 *        javax.oss.cbe.Cardinality
 *
 *  Using template :
 *        templates/1.3/datatypeInterface.vm
 *
 * Copyright 2002-2007 The Members of the OSS through Java(TM) Initiative.
 * All rights reserved. Use is subject to license terms.
 */
package javax.oss.cbe;

import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.bind.annotation.XmlType;

import ossj.common.cbe.CardinalityAdapter;

@XmlType
@XmlJavaTypeAdapter(value=CardinalityAdapter.class)

/**
 *  Public interface definition for Cardinality.
 *
 * The <CODE>Cardinality</CODE> defines the numeric relationships between occurrences of the
 * entities on either end of a relationship.
 * This interface defines the cardinality value of the association's end.
 * The <CODE>Cardinality</CODE> interface is used in {@link AssociationRule AssociationRules}.
 * An association rule defines the constraints for a particular association type
 * and the cardinality is one of the constraints defined in the rule.
 * The cardinality is accessed through the {@link AssociationRule#getAEndCardinality getAEndCardinality()}
 * and {@link AssociationRule#getZEndCardinality getZEndCardinality()}
 * methods of the {@link AssociationRule AssociationRule} interface.
 *
 */
public interface Cardinality 
	extends java.lang.Cloneable, java.io.Serializable {

    public static final int MAX_CARDINALITY = -1;

    /**
     * Deep copy of this object.
     *
     * @return The cloned object
     */
    public Object clone();


    /**
     *
     * Attribute getter for minNumber.
     *
     *
     * Sets the number defining the minimum of the cardinality value at
     * the association's end.
     *
     * @return the value of the minNumber field.
     *
     */
    public int getMinNumber( );


    /**
     * Attribute setter for minNumber.
     *
     *
     * Sets the number defining the minimum of the cardinality value at
     * the association's end.
     * @param value - the value to use to set the minNumber attribute.
     * @throws java.lang.IllegalArgumentException
     *         Thrown to report that a bad argument was provided to the method.
     *
     */
    public void setMinNumber(int value)
        throws
        java.lang.IllegalArgumentException;

    /**
     *
     * Attribute getter for maxNumber.
     *
     *
     * Sets the number defining the maximum of the cardinality value at
     * the association's end. The maximum is either a non negative integer
     * or has a value of "<CODE>MAX_CARDINALITY</CODE>" to indicate "n" or "many"
     * for example in a "0..n", "1..n" type cardinality value(see {@link #MAX_CARDINALITY}).
     *
     * @return the value of the maxNumber field.
     *
     */
    public int getMaxNumber( );


    /**
     * Attribute setter for maxNumber.
     *
     *
     * Sets the number defining the maximum of the cardinality value at
     * the association's end. The maximum is either a non negative integer
     * or has a value of "<CODE>MAX_CARDINALITY</CODE>" to indicate "n" or "many"
     * for example in a "0..n", "1..n" type cardinality value(see {@link #MAX_CARDINALITY}).
     * @param value - the value to use to set the maxNumber attribute.
     * @throws java.lang.IllegalArgumentException
     *         Thrown to report that a bad argument was provided to the method.
     *
     */
    public void setMaxNumber(int value)
        throws
        java.lang.IllegalArgumentException;


}
