Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2012
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.96 KB | None | 0 0
  1. public interface Entity<K> {
  2.    public K getId();
  3.    public void setId(K value);
  4. }
  5.  
  6. public interface HasName {
  7.     String getName();
  8.     void setName(String value);
  9. }
  10.  
  11. public interface NamedEntity<K> extends Entity<K>, HasName
  12. {
  13. }
  14.  
  15. public interface NamedEntityPropertyAccess extends PropertyAccess<NamedEntity<?>> {
  16.     NamedEntityPropertyAccess INSTANCE = GWT.create(NamedEntityPropertyAccess.class);
  17.    
  18.     ModelKeyProvider<NamedEntity<?>> id();
  19.     ValueProvider<NamedEntity<?>, String> name();
  20. }
  21.  
  22. public interface ManagementGroup extends NamedEntity<Integer> {
  23.  
  24.     Integer getParentId();
  25.     Integer getBusinessUnitId();
  26.     Integer getContactTypeId();
  27. }
  28.  
  29.  
  30. _managementGroupStore = new TreeStore<ManagementGroup>(NamedEntityPropertyAccess.INSTANCE.id());
  31. final Tree<ManagementGroup, String> _managementGroupTree = new Tree<ManagementGroup, String>(
  32.                 _managementGroupStore, (ValueProvider)NamedEntityPropertyAccess.INSTANCE.name());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement