예제 #1
0
  public static ObjectTypeGuiDescriptor getDescriptor(QName relation) {
    for (ObjectTypeGuiDescriptor descr : ObjectTypeGuiDescriptor.values()) {
      if (descr.getRelation() != null && descr.getRelation().equals(relation)) {
        return descr;
      }
    }

    return null;
  }
예제 #2
0
  public static ObjectTypeGuiDescriptor getDescriptor(Class type) {
    for (ObjectTypeGuiDescriptor descr : ObjectTypeGuiDescriptor.values()) {
      if (descr.getType() != null && descr.getType().getClassDefinition().equals(type)) {
        return descr;
      }
    }

    return null;
  }
예제 #3
0
  public static ObjectTypeGuiDescriptor getDescriptor(ObjectTypes type) {
    if (type == null) {
      return null;
    }
    for (ObjectTypeGuiDescriptor descr : ObjectTypeGuiDescriptor.values()) {
      if (descr.getType() != null && descr.getType().equals(type)) {
        return descr;
      }
    }

    return null;
  }