Переименование комментариев.

This commit is contained in:
AKurakin 2023-04-07 19:25:06 +03:00
parent 9b92dfdf93
commit d44bea5228
7 changed files with 14 additions and 17 deletions

View file

@ -3,13 +3,12 @@ package ru.spcex.clearing.backendapi.meta;
import ru.clearing.classes.ConstSerializable; import ru.clearing.classes.ConstSerializable;
public class OtcMetaServerGetterNotFoundException extends RuntimeException { public class ClrxMetaServerGetterNotFoundException extends RuntimeException {
private static final long serialVersionUID = ConstSerializable.serialVersionUID; private static final long serialVersionUID = ConstSerializable.serialVersionUID;
public OtcMetaServerGetterNotFoundException(Class clazz, String getterName) { public ClrxMetaServerGetterNotFoundException(Class clazz, String getterName) {
super( super(
String.format( String.format("Method %s() not found for class %s and subclasses",
"Method %s() not found for class %s and subclasses!",
getterName, clazz getterName, clazz
) )
); );

View file

@ -61,7 +61,7 @@ public abstract class FieldExtracted {
//fixme somehow externalize custom serialization for type //fixme somehow externalize custom serialization for type
// тут нужно вернуть список id объектов а не список самих объектов для случая // тут нужно вернуть список id объектов а не список самих объектов для случая
// - add(r, "addresseeId", o.getAddressee() == null ? null : o.getAddressee().stream().map(OtcObjectBase::getId).collect(Collectors.toSet()), fieldFilter); // - add(r, "addresseeId", o.getAddressee() == null ? null : o.getAddressee().stream().map(ObjectBase::getId).collect(Collectors.toSet()), fieldFilter);
if (result instanceof Set && ((Set) result).size() > 0) { if (result instanceof Set && ((Set) result).size() > 0) {
try { try {
Set t = new HashSet(); Set t = new HashSet();

View file

@ -27,7 +27,7 @@ public class MetaServer extends MetaBase {
private int classNameMock = 1; private int classNameMock = 1;
@SuppressWarnings("Duplicates") @SuppressWarnings("Duplicates")
public void initAndValidate() throws ClearingMetaServerValidationException, OtcMetaServerGetterNotFoundException { public void initAndValidate() throws ClearingMetaServerValidationException, ClrxMetaServerGetterNotFoundException {
if (objectsExtracted == null) { if (objectsExtracted == null) {
objectsExtracted = new LinkedList<>(); objectsExtracted = new LinkedList<>();
actionObjectsExtracted = new ConcurrentHashMap<>(); actionObjectsExtracted = new ConcurrentHashMap<>();
@ -131,7 +131,7 @@ public class MetaServer extends MetaBase {
} }
} }
validateGetterForObject(o); validateGetterForObject(o);
} catch (OtcMetaServerGetterNotFoundException e) { } catch (ClrxMetaServerGetterNotFoundException e) {
throw e; throw e;
} catch (Throwable e) { } catch (Throwable e) {
throw new ClearingMetaServerValidationException(e.getLocalizedMessage()); throw new ClearingMetaServerValidationException(e.getLocalizedMessage());
@ -149,7 +149,7 @@ public class MetaServer extends MetaBase {
// } // }
// } // }
// validateGetterForObject(o); // validateGetterForObject(o);
// } catch (OtcMetaServerGetterNotFoundException e) { // } catch (ClrxMetaServerGetterNotFoundException e) {
// throw e; // throw e;
// } catch (Throwable e) { // } catch (Throwable e) {
// throw new ClearingMetaServerValidationException(e.getLocalizedMessage()); // throw new ClearingMetaServerValidationException(e.getLocalizedMessage());
@ -176,11 +176,11 @@ public class MetaServer extends MetaBase {
break; break;
} }
if (m == null) { if (m == null) {
throw new OtcMetaServerGetterNotFoundException(c, getterName); throw new ClrxMetaServerGetterNotFoundException(c, getterName);
} }
} }
c = RfHelper.getMetodReturnClazz(m); c = RfHelper.getMetodReturnClazz(m);
} catch (OtcMetaServerGetterNotFoundException e) { } catch (ClrxMetaServerGetterNotFoundException e) {
log.trace("META SERVER >>> Геттер {}.{} не найден!", o.getClassName(), getterName); log.trace("META SERVER >>> Геттер {}.{} не найден!", o.getClassName(), getterName);
} }
} }

View file

@ -14,7 +14,7 @@ public class RfHelper {
private static Map<String, Reflections> REFLECTION_CACHE = new HashMap<>(); private static Map<String, Reflections> REFLECTION_CACHE = new HashMap<>();
public static final String BUSINESS_OBJECT_REF = "BusinessObjectRef"; public static final String BUSINESS_OBJECT_REF = "BusinessObjectRef";
public static final String OTC_CLASSES_PACKAGE = "com.moex.otc.classes"; public static final String CLRX_CLASSES_PACKAGE = "ru.clearing.classes";
public static final String GETTER_NAME_PREFIX = "get"; public static final String GETTER_NAME_PREFIX = "get";
public static final String GETTER_NAME_ID = GETTER_NAME_PREFIX + "Id"; public static final String GETTER_NAME_ID = GETTER_NAME_PREFIX + "Id";
@ -28,7 +28,7 @@ public class RfHelper {
} }
public static <T> Class<?>[] getSubclasses(Class<T> clazz) { public static <T> Class<?>[] getSubclasses(Class<T> clazz) {
return getSubclasses(clazz, OTC_CLASSES_PACKAGE); return getSubclasses(clazz, CLRX_CLASSES_PACKAGE);
} }
public static <T> Class<?>[] getSubclasses(Class<T> clazz, String packageName) { public static <T> Class<?>[] getSubclasses(Class<T> clazz, String packageName) {

View file

@ -4,9 +4,7 @@ lib
.idea .idea
*.log *.log
temp temp
otc.logs_IS_UNDEFINED
.gitconfig .gitconfig
dependency-reduced-pom.xml dependency-reduced-pom.xml
*/otc-test/src/test/resources/dataForDb/*.sql
**/out **/out
preview preview

View file

@ -174,7 +174,7 @@ public final class DbDataUtils {
/** /**
* Это наш класс и не примитив * Это наш класс и не примитив
* *
* @param value объект, возможно otc-объект. * @param value объект, возможно clearing-объект.
* @return нужно ли применять deepScan * @return нужно ли применять deepScan
*/ */
private static boolean isBusinessObject(Object value) { private static boolean isBusinessObject(Object value) {

View file

@ -31,9 +31,9 @@ public abstract class SpcexObjectBase implements WithId, Serializable {
if (this == o) return true; if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false; if (o == null || getClass() != o.getClass()) return false;
SpcexObjectBase otcObject = (SpcexObjectBase) o; SpcexObjectBase clrxObject = (SpcexObjectBase) o;
return id.equals(otcObject.id); return id.equals(clrxObject.id);
} }
@Override @Override