/** * <p>Initialize filler for given object class.</p> * @param pClass object class * @throws Exception - an exception **/ public final synchronized void init(final Class<T> pClass) throws Exception { this.objectClass = pClass; this.fieldsNames = new HashSet<String>(); Field[] fields = getUtlReflection().retrieveFields(this.objectClass); for (Field field : fields) { this.fieldsNames.add(field.getName()); } }
/** * <p>Initialize filler for given object class.</p> * @param pClass object class * @throws Exception - an exception **/ public final synchronized void init(final Class<T> pClass) throws Exception { this.objectClass = pClass; this.fieldsNames.clear(); this.gettersMap.clear(); this.settersMap.clear(); Field[] fields = getUtlReflection().retrieveFields(this.objectClass); for (Field field : fields) { Method getter = getUtlReflection() .retrieveGetterForField(pClass, field.getName()); Method setter = getUtlReflection() .retrieveSetterForField(pClass, field.getName()); this.gettersMap.put(field.getName(), getter); this.settersMap.put(field.getName(), setter); this.fieldsNames.add(field.getName()); } }
if (methMap == null) { methMap = new HashMap<String, Method>(); Method[] methods = getUtlReflection().retrieveMethods(pClass); for (Method method : methods) { if (method.getName().startsWith("set")) {
/** * <p>It must be invoked at once by Factory to improve performance * by not using locking during usage this converter.</p> * @param pClass entity class * @param pIdName entity ID name * @throws Exception - an exception **/ public final void init(final Class<T> pClass, final String pIdName) throws Exception { this.entityClass = pClass; this.getterId = getUtlReflection() .retrieveGetterForField(this.entityClass, pIdName); this.setterId = getUtlReflection() .retrieveSetterForField(this.entityClass, pIdName); }
if (idName.length == 1) { // if non-composite PK Field fieldId = getUtlReflection() .retrieveField(pEntity.getClass(), idName[0]); fieldId.setAccessible(true); Object idValue = fieldId.get(pEntity);
for (int j = 0; j < fpa.length; j++) { Method getter = this.utlReflection .retrieveGetterForField(entity.getClass(), fpa[j]); objVal = getter.invoke(entity); entity = objVal;
if (idName.length == 1) { // if non-composite PK Field fieldId = getUtlReflection() .retrieveField(pEntity.getClass(), idName[0]); fieldId.setAccessible(true); Object idValue = fieldId.get(pEntity);
/** * <p>Initialize converter for given object class.</p> * @param pClass object class * @throws Exception - an exception **/ public final synchronized void init(final Class<T> pClass) throws Exception { this.objectClass = pClass; this.fieldsNames = new HashSet<String>(); Field[] fields = getUtlReflection().retrieveFields(this.objectClass); for (Field field : fields) { this.fieldsNames.add(field.getName()); } }
if (idName.length == 1) { // if non-composite PK Field fieldId = getUtlReflection() .retrieveField(pEntity.getClass(), idName[0]); fieldId.setAccessible(true); Object idValue = fieldId.get(pEntity);
if (methMap == null) { methMap = new HashMap<String, Method>(); Method[] methods = getUtlReflection().retrieveMethods(pClass); for (Method method : methods) { if (method.getName().startsWith("get")) {
/** * <p>Get thing for given class and thing name.</p> * @param pClass a Class * @param pFieldName Thing Name * @return a thing **/ @Override public final Field getFor(final Class<?> pClass, final String pFieldName) { Map<String, Field> fldMap = this.rapiFieldsMap.get(pClass); if (fldMap == null) { // There is no way to get from Map partially initialized bean // in this double-checked locking implementation // cause putting to the Map fully initialized bean synchronized (this.rapiFieldsMap) { fldMap = this.rapiFieldsMap.get(pClass); if (fldMap == null) { fldMap = new HashMap<String, Field>(); Field[] fields = getUtlReflection().retrieveFields(pClass); for (Field field : fields) { fldMap.put(field.getName(), field); } this.rapiFieldsMap.put(pClass, fldMap); } } } return fldMap.get(pFieldName); }
if (idName.length == 1) { // if non-composite PK Field fieldId = getUtlReflection() .retrieveField(pEntity.getClass(), idName[0]); fieldId.setAccessible(true); Object idValue = fieldId.get(pEntity);
Field[] fields = getUtlReflection().retrieveFields(pClazz); for (Field field : fields) { if (this.mngSettings.getFieldsSettings()
if (idName.length == 1) { // if non-composite PK Field fieldId = getUtlReflection() .retrieveField(pEntity.getClass(), idName[0]); fieldId.setAccessible(true); Object idValue = fieldId.get(pEntity);
+ "/" + subFolder + FOLDER_CLASS_TO_FS + "/" + clazz.getSimpleName() + ".xml"); Field[] fields = getUtlReflection().retrieveFields(clazz); if (propsClassToSetting != null && this.isShowDebugMessages) {
Field[] fields = getUtlReflection().retrieveFields(clazz); for (Field field : fields) { FieldSql fieldSql = tableSql.getFieldsMap().get(field.getName());