示例#1
0
 protected AttributeImpl(Fqn name, Fqn group) {
   this.name = name;
   this.group = group;
   globalId = Controller.getUniqueId(name);
 }
示例#2
0
/**
 * @author Dan Adams
 * @param <T>
 */
public class AttributeImpl<T> implements Attribute<T> {

  private final UUID globalId;
  private final transient int localId = Controller.getLocalId();
  private final Fqn name;
  private TypeDef type;
  private String description;
  private Value value;
  private Value min;
  private Value max;
  private boolean dynamic;
  private Fqn group;
  private Facet owner;
  private UUID guid;
  private long id;

  private T valuet;

  protected AttributeImpl(Fqn name, Fqn group) {
    this.name = name;
    this.group = group;
    globalId = Controller.getUniqueId(name);
  }

  @Override
  public String getDescription() {
    return description;
  }

  public void setDescription(String theDescription) {
    this.description = theDescription;
  }

  public UUID getGlobalId() {
    return globalId;
  }

  public int getLocalId() {
    return localId;
  }

  @Override
  public void setLocalId(int id) {
    throw new UnsupportedOperationException(
        "Not supported yet."); // To change body of generated methods, choose Tools | Templates.
  }

  public Value getMax() {
    return max;
  }

  public void setMax(Value theMax) {
    this.max = theMax;
  }

  public Value getMin() {
    return min;
  }

  public void setMin(Value theMin) {
    this.min = theMin;
  }

  @Override
  public Fqn getName() {
    return name;
  }

  @Override
  public void setName(Fqn name) {
    throw new UnsupportedOperationException(
        "Not supported yet."); // To change body of generated methods, choose Tools | Templates.
  }

  @Override
  public Facet getOwner() {
    return owner;
  }

  public Fqn getGroup() {
    return group;
  }

  //    public TypeDef getType() {
  //        return type;
  //    }
  public void setType(TypeDef theType) {
    this.type = theType;
  }

  public Value getValue() {
    return value;
  }

  public void setValue(Value theValue) {
    this.value = theValue;
  }

  @Override
  public boolean isDynamic() {
    return dynamic;
  }

  public void setDynamic(boolean theDynamic) {
    this.dynamic = theDynamic;
  }

  @Override
  public UUID getUniqueId() {
    return guid;
  }

  //    @Override
  public long getId() {
    return id;
  }

  @Override
  public Type<T> getType() {
    throw new UnsupportedOperationException(
        "Not supported yet."); // To change body of generated methods, choose Tools | Templates.
  }

  ////    @Override
  //    public T getValue() {
  //        return value;
  //    }
  //    @Override
  public void setValue(T value) {
    this.valuet = value;
  }

  //    @Override
  //    public String getDescription() {
  //        return description;
  //    }
  //    @Override
  //    public Fqn getGroup() {
  //        return group;
  //    }
  //    @Override
  public void setGroup(Fqn group) {
    this.group = group;
  }

  //    @Override
  //    public Fqn getName() {
  //        return name;
  //    }
  ////    @Override
  //    public void setName(Fqn name) {
  //        this.name = name;
  //    }
  //    @Override
  //    @SuppressWarnings("unchecked")
  //    public Class<T> getType()
  //    {
  //        return (Class<T>) value.getClass();
  //    }
  //    @Override
  //    public boolean isDynamic() {
  //        return dynamic;
  //    }
  //    public void setDynamic(boolean value) {
  //        dynamic = value;
  //    }
  //    @Override
  //    public Facet getOwner() {
  //        return owner;
  //    }
  @Override
  public void setOwner(Facet theOwner) {
    throw new UnsupportedOperationException(
        "Not supported yet."); // To change body of generated methods, choose Tools | Templates.
  }

  @Override
  public String setDescription() {
    throw new UnsupportedOperationException(
        "Not supported yet."); // To change body of generated methods, choose Tools | Templates.
  }
}