Codota Logo
ValueType.getDomainName
Code IndexAdd Codota to your IDE (free)

How to use
getDomainName
method
in
pt.ist.fenixframework.dml.ValueType

Best Java code snippets using pt.ist.fenixframework.dml.ValueType.getDomainName (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: fenix-framework/fenix-framework

public static String makeSafeValueTypeName(ValueType vt) {
  return vt.getDomainName().replace('.', '$');
}
origin: fenix-framework/fenix-framework

protected String getSqlTypeName(ValueType vt) {
  ValueType extType = getExternalizationType(vt);
  String toSqlMethodName = "getValueFor" + (extType.isEnum() ? "Enum" : extType.getDomainName());
  for (Method m : ToSqlConverter.class.getDeclaredMethods()) {
    if (m.getName().equals(toSqlMethodName)) {
      return m.getReturnType().getName();
    }
  }
  throw new Error("Something's wrong.  Couldn't find the appropriate base value type.");
}
origin: fenix-framework/fenix-framework

public static String getSerializedFormTypeName(ValueType vt, boolean simple) {
  List<ExternalizationElement> extElems = vt.getExternalizationElements();
  if (extElems.size() == 0) { // built-in type do not have externalizers
    return simple ? vt.getDomainName() : vt.getFullname();
  } else if (extElems.size() == 1) {
    // It's just a wrapper.  So, our serialized form is the same as our component's
    return getSerializedFormTypeName(extElems.get(0).getType(), simple);
  } else {
    // Alas, we need a full-blown SerializedForm for this one
    return simple ? JsonElement.class.getSimpleName() : JsonElement.class.getName();
  }
}
origin: fenix-framework/fenix-framework

  public static String getJdbcTypeFor(DomainModel model, String valueType) {
    ValueType vt = model.findValueType(valueType);

    String jdbcType = null;

    if (vt.isEnum()) {
      jdbcType = "VARCHAR";
    } else if (vt.isBuiltin()) {
      jdbcType = BUILT_IN_JDBC_MAP.get(valueType);
    } else {
      List<ExternalizationElement> extElems = vt.getExternalizationElements();
      if (extElems.size() != 1) {
        return BUILT_IN_JDBC_MAP.get("JsonElement");
      }
      jdbcType = getJdbcTypeFor(model, extElems.get(0).getType().getDomainName());
    }

    if (jdbcType == null) {
      throw new Error("Couldn't find a JDBC type for the value type " + valueType);
    }

    return jdbcType;
  }
}
origin: fenix-framework/fenix-framework

protected static void updateFields(final DomainModel domainModel, final ClassDescriptor classDescriptor,
    final DomainClass domClass, final Map<String, ClassDescriptor> ojbMetadata, final Class<?> persistentFieldClass)
    throws Exception {
  DomainEntity domEntity = domClass;
  int fieldID = 1;
  addPrimaryFieldDescriptor(domainModel, "oid", "long", fieldID++, classDescriptor, persistentFieldClass);
  // write the domainMetaObject for all domain objects
  addFieldDescriptor(domainModel, "oidDomainMetaObject", "Long", fieldID++, classDescriptor, persistentFieldClass);
  while (domEntity instanceof DomainClass) {
    DomainClass dClass = (DomainClass) domEntity;
    Iterator<Slot> slots = dClass.getSlots();
    while (slots.hasNext()) {
      Slot slot = slots.next();
      String slotName = slot.getName();
      String slotType = slot.getSlotType().getDomainName();
      addFieldDescriptor(domainModel, slotName, slotType, fieldID++, classDescriptor, persistentFieldClass);
    }
    for (Role role : dClass.getRoleSlotsList()) {
      String roleName = role.getName();
      if ((role.getMultiplicityUpper() == 1) && (roleName != null)) {
        String foreignOidField = "oid" + StringUtils.capitalize(roleName);
        addFieldDescriptor(domainModel, foreignOidField, "Long", fieldID++, classDescriptor, persistentFieldClass);
      }
    }
    domEntity = dClass.getSuperclass();
  }
}
origin: fenix-framework/fenix-framework

protected void generateValueTypeSerializations() {
  for (ValueType vt : getDomainModel().getAllValueTypes()) {
    if (!(vt.isBuiltin() || vt.isEnum())) {
      println(out, "");
      print(out, "// VT: " + vt.getDomainName() + " serializes as " + getSerializedFormTypeName(vt));
      generateValueTypeSerialization(vt);
      generateValueTypeDeSerialization(vt);
    }
  }
}
origin: fenix-framework/fenix-framework

if (extElemVt.isBuiltin() || extElemVt.isEnum()) {
  print(out, "JsonConverter.get");
  print(out, capitalize(extElem.getType().getDomainName()));
  print(out, "FromJson(obj.getAsJsonObject().get(\"");;
  print(out, makePrettySlotName(extElem));
pt.ist.fenixframework.dmlValueTypegetDomainName

Popular methods of ValueType

  • isEnum
  • getFullname
  • isBuiltin
  • getExternalizationElements
  • getBaseType
  • getInternalizationMethodName

Popular in Java

  • Making http post requests using okhttp
  • setScale (BigDecimal)
  • getSharedPreferences (Context)
  • onRequestPermissionsResult (Fragment)
  • Kernel (java.awt.image)
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • DataSource (javax.sql)
    A factory for connections to the physical data source that this DataSource object represents. An alt
  • Option (scala)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now