Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.Opens in a new tab

For information on migrating to InterSystems IRISOpens in a new tab, see Why Migrate to InterSystems IRIS?

その他の例 : PhoneNumber.java


package contacts;
import com.jalapeno.annotations.*;

@Access(type = AccessType.FIELD,level = AccessLevel.PRIVATE)
@Index(name = "NumberIndex", propertyNames = { "number" }, isPrimaryKey = true)
public class PhoneNumber {

    @PropertyParameters({

     @PropertyParameter(name="VALUELIST", value=",Home,Office,Mobile"),

     @PropertyParameter(name="DISPLAYLIST", value=",H,O,M")
    })
    @CacheProperty(name="PhoneNumberType", type="%Library.String")
    private String type;

    @Relationship(type=RelationshipType.MANY_TO_ONE,
    inverseClass="contacts.Contact",inverseProperty="phoneNumbers")
    private Contact owner;
    private String number;

    public PhoneNumber() {
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }


    public Contact getOwner() {
        return owner;
    }

    public void setOwner(Contact owner) {
        this.owner = owner;
    }


    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

}

FeedbackOpens in a new tab