public boolean isSchemaSet() { return !Strings.isNullOrEmpty(schema); } }
public boolean isCatalogSet() { return !Strings.isNullOrEmpty(catalog); }
private boolean validImport(final String type) { return !Strings.isNullOrEmpty(type) && !Types.isPrimitive(type); }
private boolean validImport(final String type) { return !Strings.isNullOrEmpty(type) && !Types.isPrimitive(type); }
private boolean validImport(final String type) { return !Strings.isNullOrEmpty(type) && !Types.isPrimitive(type); }
@Override public String[] getStringArrayValue(String name) { final List<String> result = new ArrayList<String>(); String literalValue = getLiteralValue(name); // Remove {} if (literalValue.startsWith("{") && literalValue.endsWith("}")) { literalValue = literalValue.substring(1, literalValue.length() - 1); } if (!Strings.isNullOrEmpty(literalValue)) { for (String value : literalValue.split(",")) { result.add(Strings.unquote(value)); } } return result.toArray(new String[result.size()]); }
@Override public String[] getStringArrayValue(String name) { final List<String> result = new ArrayList<String>(); String literalValue = getLiteralValue(name); // Remove {} if (literalValue.startsWith("{") && literalValue.endsWith("}")) { literalValue = literalValue.substring(1, literalValue.length() - 1); } if (!Strings.isNullOrEmpty(literalValue)) { for (String value : literalValue.split(",")) { result.add(Strings.unquote(value)); } } return result.toArray(new String[result.size()]); }
private boolean validImport(final String type) { String className = Types.toSimpleName(type); // check if this class name is equal to the class to import if (className.equals(getName())) { return false; } // check if any import has the same class name for (final Import imprt : getImports()) { String importClassName = imprt.getSimpleName(); if (importClassName.equals(className)) { return false; } } return !Strings.isNullOrEmpty(type) && !Types.isPrimitive(type) && !Strings.isNullOrEmpty(Types.getPackage(type)); }
private boolean validImport(final String type) { String className = Types.toSimpleName(type); // check if this class name is equal to the class to import if (className.equals(getName())) { return false; } // check if any import has the same class name for (final Import imprt : getImports()) { String importClassName = imprt.getSimpleName(); if (importClassName.equals(className)) { return false; } } return !Strings.isNullOrEmpty(type) && !Types.isPrimitive(type) && !Strings.isNullOrEmpty(Types.getPackage(type)); }
public static String getEntityTable(final JavaClass<?> entity) { String table = entity.getName(); if (entity.hasAnnotation(Entity.class)) { Annotation<?> a = entity.getAnnotation(Entity.class); if (!Strings.isNullOrEmpty(a.getStringValue("name"))) { table = a.getStringValue("name"); } else if (!Strings.isNullOrEmpty(a.getStringValue())) { table = a.getStringValue(); } } return table; }
@Override public String getCanonicalName() { String result = getName(); JavaType<?> enclosingTypeLocal = this; while (enclosingTypeLocal != enclosingTypeLocal.getEnclosingType()) { enclosingTypeLocal = enclosingTypeLocal.getEnclosingType(); result = enclosingTypeLocal.getName() + "." + result; } if (!Strings.isNullOrEmpty(getPackage())) result = getPackage() + "." + result; return result; }
@Override public String getQualifiedName() { String result = getName(); JavaType<?> enclosingTypeLocal = this; while (enclosingTypeLocal != enclosingTypeLocal.getEnclosingType()) { enclosingTypeLocal = enclosingTypeLocal.getEnclosingType(); result = enclosingTypeLocal.getName() + "$" + result; } if (!Strings.isNullOrEmpty(getPackage())) result = getPackage() + "." + result; return result; }
@Override public String getCanonicalName() { String result = getName(); JavaType<?> enclosingTypeLocal = this; while (enclosingTypeLocal != enclosingTypeLocal.getEnclosingType()) { enclosingTypeLocal = enclosingTypeLocal.getEnclosingType(); result = enclosingTypeLocal.getName() + "." + result; } if (!Strings.isNullOrEmpty(getPackage())) result = getPackage() + "." + result; return result; }
@Override public String getQualifiedName() { String result = getName(); JavaType<?> enclosingTypeLocal = this; while (enclosingTypeLocal != enclosingTypeLocal.getEnclosingType()) { enclosingTypeLocal = enclosingTypeLocal.getEnclosingType(); result = enclosingTypeLocal.getName() + "$" + result; } if (!Strings.isNullOrEmpty(getPackage())) result = getPackage() + "." + result; return result; }
@Override public String getCanonicalName() { String result = getName(); JavaType<?> enclosingTypeLocal = this; while (enclosingTypeLocal != enclosingTypeLocal.getEnclosingType()) { enclosingTypeLocal = getEnclosingType(); result = enclosingTypeLocal.getEnclosingType().getName() + "." + result; enclosingTypeLocal = enclosingTypeLocal.getEnclosingType(); } if (!Strings.isNullOrEmpty(getPackage())) result = getPackage() + "." + result; return result; }
@Override public String getCanonicalName() { String result = getName(); JavaType<?> enclosingType = this; while (enclosingType != enclosingType.getEnclosingType()) { enclosingType = getEnclosingType(); result = enclosingType.getEnclosingType().getName() + "." + result; enclosingType = enclosingType.getEnclosingType(); } if (!Strings.isNullOrEmpty(getPackage())) result = getPackage() + "." + result; return result; }
@Override public String getCanonicalName() { String result = getName(); JavaType<?> enclosingType = this; while (enclosingType != enclosingType.getEnclosingType()) { enclosingType = getEnclosingType(); result = enclosingType.getEnclosingType().getName() + "." + result; enclosingType = enclosingType.getEnclosingType(); } if (!Strings.isNullOrEmpty(getPackage())) result = getPackage() + "." + result; return result; }
@Override public String getQualifiedName() { String result = getName(); JavaType<?> enclosingType = this; while (enclosingType != enclosingType.getEnclosingType()) { enclosingType = getEnclosingType(); result = enclosingType.getEnclosingType().getName() + "$" + result; enclosingType = enclosingType.getEnclosingType(); } if (!Strings.isNullOrEmpty(getPackage())) result = getPackage() + "." + result; return result; }
@Override public String getQualifiedName() { String result = getName(); JavaType<?> enclosingType = this; while (enclosingType != enclosingType.getEnclosingType()) { enclosingType = getEnclosingType(); result = enclosingType.getEnclosingType().getName() + "$" + result; enclosingType = enclosingType.getEnclosingType(); } if (!Strings.isNullOrEmpty(getPackage())) result = getPackage() + "." + result; return result; }
@Override public String getQualifiedName() { String result = getName(); JavaType<?> enclosingTypeLocal = this; while (enclosingTypeLocal != enclosingTypeLocal.getEnclosingType()) { enclosingTypeLocal = getEnclosingType(); result = enclosingTypeLocal.getEnclosingType().getName() + "$" + result; enclosingTypeLocal = enclosingTypeLocal.getEnclosingType(); } if (!Strings.isNullOrEmpty(getPackage())) result = getPackage() + "." + result; return result; }