/** * Sets a property for the datastore of the given class */ private static<D extends DataStore<K,T>, K, T extends Persistent> void setProperty(Properties properties, Class<D> dataStoreClass, String baseKey, String value) { properties.setProperty(GORA+"."+org.apache.gora.util.StringUtils.getClassname(dataStoreClass)+"."+baseKey, value); }
/** * Sets a property for the datastore of the given class */ private static<D extends DataStore<K,T>, K, T extends Persistent> void setProperty(Properties properties, Class<D> dataStoreClass, String baseKey, String value) { properties.setProperty(GORA+"."+org.apache.gora.util.StringUtils.getClassname(dataStoreClass)+"."+baseKey, value); }
/** * Returns the name of the class without the package name. * * @param clazz Class type instance which name is to be returned. * @return class name string. */ public static String getClassname(Class<?> clazz) { return getClassname(clazz.getName()); }
/** * Sets a property for the datastore of the given class */ private static<D extends DataStore<K,T>, K, T extends Persistent> void setProperty(Properties properties, Class<D> dataStoreClass, String baseKey, String value) { properties.setProperty(GORA+"."+org.apache.gora.util.StringUtils.getClassname(dataStoreClass)+"."+baseKey, value); }
/** * Returns the name of the class without the package name. * * @param clazz Class type instance which name is to be returned. * @return class name string. */ public static String getClassname(Class<?> clazz) { return getClassname(clazz.getName()); }
/** * Sets a property for the datastore of the given class */ private static<D extends DataStore<K,T>, K, T extends Persistent> void setProperty(Properties properties, Class<D> dataStoreClass, String baseKey, String value) { properties.setProperty(GORA+"."+org.apache.gora.util.StringUtils.getClassname(dataStoreClass)+"."+baseKey, value); }
/** * Returns the name of the schema to use for the persistent class. * * First the schema name in the defined properties is returned. If null then * the provided mappingSchemaName is returned. If this is null too, * the class name, without the package, of the persistent class is returned. * @param mappingSchemaName the name of the schema as read from the mapping file * @param persistentClass persistent class */ protected String getSchemaName(String mappingSchemaName, Class<?> persistentClass) { String schemaName = WSDataStoreFactory.getDefaultSchemaName(properties, this); if(schemaName != null) { return schemaName; } if(mappingSchemaName != null) { return mappingSchemaName; } return StringUtils.getClassname(persistentClass); }
/** * Returns the name of the schema to use for the persistent class. * * First the schema name in the defined properties is returned. If null then * the provided mappingSchemaName is returned. If this is null too, * the class name, without the package, of the persistent class is returned. * @param mappingSchemaName the name of the schema as read from the mapping file * @param persistentClass persistent class */ protected String getSchemaName(String mappingSchemaName, Class<?> persistentClass) { String schemaName = WSDataStoreFactory.getDefaultSchemaName(properties, this); if(schemaName != null) { return schemaName; } if(mappingSchemaName != null) { return mappingSchemaName; } return StringUtils.getClassname(persistentClass); }
String fullKey = GORA + "." + org.apache.gora.util.StringUtils.getClassname(clazz).toLowerCase(Locale.getDefault()) + "." + baseKey; String value = getProperty(properties, fullKey); if(value != null) {
String fullKey = GORA + "." + org.apache.gora.util.StringUtils.getClassname(clazz).toLowerCase(Locale.getDefault()) + "." + baseKey; String value = getProperty(properties, fullKey); if(value != null) {
/** * Returns the name of the schema to use for the persistent class. * * First the schema name in the {@link Configuration} is used. If null, * the schema name in the defined properties is returned. If null then * the provided mappingSchemaName is returned. If this is null too, * the class name, without the package, of the persistent class is returned. * * @param mappingSchemaName the name of the schema as read from the mapping file * @param persistentClass persistent class * @return String */ protected String getSchemaName(String mappingSchemaName, Class<?> persistentClass) { String confSchemaName = getOrCreateConf().get("preferred.schema.name"); if (confSchemaName != null) { return confSchemaName; } String schemaName = DataStoreFactory.getDefaultSchemaName(properties, this); if(schemaName != null) { return schemaName; } if(mappingSchemaName != null) { return mappingSchemaName; } return StringUtils.getClassname(persistentClass); } }
/** * Returns the name of the schema to use for the persistent class. * * First the schema name in the {@link Configuration} is used. If null, * the schema name in the defined properties is returned. If null then * the provided mappingSchemaName is returned. If this is null too, * the class name, without the package, of the persistent class is returned. * * @param mappingSchemaName the name of the schema as read from the mapping file * @param persistentClass persistent class * @return String */ protected String getSchemaName(String mappingSchemaName, Class<?> persistentClass) { String confSchemaName = getOrCreateConf().get("preferred.schema.name"); if (confSchemaName != null) { return confSchemaName; } String schemaName = DataStoreFactory.getDefaultSchemaName(properties, this); if(schemaName != null) { return schemaName; } if(mappingSchemaName != null) { return mappingSchemaName; } return StringUtils.getClassname(persistentClass); } }
String fullKey = GORA + "." + org.apache.gora.util.StringUtils.getClassname(clazz) + "." + baseKey; String value = getProperty(properties, fullKey); if(value != null) {
String fullKey = GORA + "." + org.apache.gora.util.StringUtils.getClassname(clazz) + "." + baseKey; String value = getProperty(properties, fullKey); if(value != null) {