http://jira.mfd.msk:8088/browse/CLS-1 DDL памсторы готовы на 95%
This commit is contained in:
parent
24f777986d
commit
83463a1ebe
10 changed files with 239 additions and 48 deletions
|
|
@ -11,4 +11,15 @@ import ru.clearing.classes.objects.BusinessObject;
|
||||||
public class CompanyUpdate extends BusinessEvent<Company> {
|
public class CompanyUpdate extends BusinessEvent<Company> {
|
||||||
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||||
|
|
||||||
|
private Company object;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Company getObject() {
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setObject(Company object) {
|
||||||
|
this.object = object;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -10,8 +10,8 @@ import ru.clearing.classes.objects.ObjectBase;
|
||||||
public class CompanyInfo extends ObjectBase {
|
public class CompanyInfo extends ObjectBase {
|
||||||
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||||
|
|
||||||
private Long companyId; // Company.CompanyInfo.companyId = CompanyInfo.id
|
private Long companyId; // Company.CompanyInfo.companyId = CompanyInfo.id todo company_id=id - эти поля можно не добавлять в объект, их администрирует мапстор. И в базе получается они задублируются-лишнее поле company_id.
|
||||||
private String clearingMemberCategory; // ref CHAR(4),
|
private String clearingMemberCategory; // ref CHAR(4), todo такие ссылки на словари - не понял нужны как строки или нужны как ID? Зависит от политики обновления словарей.
|
||||||
private String corporationSoleType; // ref CHAR(4),
|
private String corporationSoleType; // ref CHAR(4),
|
||||||
private String countryCode; //ref CHAR(4),
|
private String countryCode; //ref CHAR(4),
|
||||||
private String description;
|
private String description;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ package ru.clearing.classes.objects;
|
||||||
|
|
||||||
import ru.clearing.classes.ConstSerializable;
|
import ru.clearing.classes.ConstSerializable;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.time.Instant;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Журнал изменения таблиц с BusinessObject
|
* Журнал изменения таблиц с BusinessObject
|
||||||
|
|
@ -10,18 +10,17 @@ import java.util.Date;
|
||||||
public abstract class BusinessEvent<T extends BusinessObject> extends ObjectBase {
|
public abstract class BusinessEvent<T extends BusinessObject> extends ObjectBase {
|
||||||
static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||||
|
|
||||||
private Date eventTime;
|
private Instant eventTime;
|
||||||
private Long userId; // event_user_id
|
private Long userId; // event_user_id
|
||||||
private T object;
|
|
||||||
|
|
||||||
public BusinessEvent() {
|
public BusinessEvent() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getEventTime() {
|
public Instant getEventTime() {
|
||||||
return eventTime;
|
return eventTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEventTime(Date eventTime) {
|
public void setEventTime(Instant eventTime) {
|
||||||
this.eventTime = eventTime;
|
this.eventTime = eventTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -33,20 +32,16 @@ public abstract class BusinessEvent<T extends BusinessObject> extends ObjectBase
|
||||||
this.userId = userId;
|
this.userId = userId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public T getObject() {
|
public abstract T getObject();
|
||||||
return object;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setObject(T object) {
|
public abstract void setObject(T object);
|
||||||
this.object = object;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return getClass().getSimpleName() + "{" +
|
return getClass().getSimpleName() + "{" +
|
||||||
"eventTime=" + eventTime +
|
"eventTime=" + eventTime +
|
||||||
", userId=" + userId +
|
", userId=" + userId +
|
||||||
", object=" + object +
|
", object=" + getObject() +
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,12 +1,13 @@
|
||||||
ru\clearing\classes\StaticData\Profile\Contact.class
|
|
||||||
ru\clearing\classes\objects\ObjectBase.class
|
|
||||||
ru\clearing\classes\ConstSerializable.class
|
|
||||||
ru\clearing\classes\StaticData\Company\CompanyRoleSet.class
|
ru\clearing\classes\StaticData\Company\CompanyRoleSet.class
|
||||||
ru\clearing\classes\StaticData\Profile\ProfileDocument.class
|
|
||||||
ru\clearing\classes\objects\BusinessEvent.class
|
|
||||||
ru\clearing\classes\StaticData\Company\Company.class
|
|
||||||
ru\clearing\classes\StaticData\User\ClearingUser.class
|
|
||||||
ru\clearing\classes\StaticData\Company\CompanySymbols.class
|
ru\clearing\classes\StaticData\Company\CompanySymbols.class
|
||||||
ru\clearing\common\interfaces\WithId.class
|
ru\clearing\common\interfaces\WithId.class
|
||||||
ru\clearing\classes\objects\BusinessObject.class
|
ru\clearing\classes\objects\BusinessObject.class
|
||||||
ru\clearing\classes\StaticData\Profile\CompanyInfo.class
|
ru\clearing\classes\StaticData\Profile\CompanyInfo.class
|
||||||
|
ru\clearing\classes\StaticData\Profile\Contact.class
|
||||||
|
ru\clearing\classes\objects\ObjectBase.class
|
||||||
|
ru\clearing\classes\ConstSerializable.class
|
||||||
|
ru\clearing\classes\StaticData\Profile\ProfileDocument.class
|
||||||
|
ru\clearing\classes\objects\BusinessEvent.class
|
||||||
|
ru\clearing\classes\StaticData\Company\Company.class
|
||||||
|
ru\clearing\classes\StaticData\User\ClearingUser.class
|
||||||
|
ru\clearing\classes\StaticData\Company\CompanyUpdate.class
|
||||||
|
|
|
||||||
|
|
@ -37,25 +37,4 @@ public abstract class BusinessEventMapStore<T extends BusinessEvent> extends Obj
|
||||||
return Collections.emptyMap();
|
return Collections.emptyMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Заполняет поля:<br>
|
|
||||||
* uuid<br>
|
|
||||||
* eventTime<br>
|
|
||||||
* ownerId<br>
|
|
||||||
* eventTypeId
|
|
||||||
*
|
|
||||||
* @param businessEvent объект для заполнения
|
|
||||||
* @param rs resultSet для выгрузки
|
|
||||||
*/
|
|
||||||
public void fillBusinessEventFields(BusinessEvent businessEvent, ResultSet rs) throws SQLException {
|
|
||||||
businessEvent.setEventTime(TimeUtil.toUtilDate(rs.getDate("eventtime")));
|
|
||||||
businessEvent.setId(getLong(rs, "id"));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void fillBusinessObjectFieds(BusinessObject businessObject, ResultSet rs) throws SQLException {
|
|
||||||
businessObject.setId(rs.getObject("orderbondid", Long.class));
|
|
||||||
businessObject.setUpdated(TimeUtil.fromDate(rs.getDate("updated")));
|
|
||||||
businessObject.setCreated(TimeUtil.fromDate(rs.getDate("created")));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,117 @@
|
||||||
|
package ru.spcex.clearing.storage.businessevent;
|
||||||
|
|
||||||
|
import org.springframework.dao.support.DataAccessUtils;
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.lang.NonNull;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import ru.clearing.classes.StaticData.Company.Company;
|
||||||
|
import ru.clearing.classes.StaticData.Company.CompanyUpdate;
|
||||||
|
import ru.clearing.classes.StaticData.Profile.CompanyInfo;
|
||||||
|
import ru.spcex.clearing.storage.base.BusinessEventMapStore;
|
||||||
|
import ru.spcex.clearing.storage.utils.DbUtilsHelper;
|
||||||
|
import ru.spcex.clearing.storage.utils.TimeUtil;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class CompanyUpdateMapStore extends BusinessEventMapStore<CompanyUpdate> {
|
||||||
|
|
||||||
|
public CompanyUpdateMapStore(JdbcTemplate jdbcTemplate) {
|
||||||
|
super(jdbcTemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTableName() {
|
||||||
|
return "COMPANY_UPDATE";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getFields() {
|
||||||
|
return new String[]{
|
||||||
|
"id", "event_time", "event_user_id",
|
||||||
|
"company_id", "created_at", "updated_at", "status", "clearing_code", "exchange_code"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public String[] getFieldsForCompanyInfo() {
|
||||||
|
return new String[]{
|
||||||
|
"id", "event_time", "event_user_id",
|
||||||
|
|
||||||
|
"company_info_id", "company_id", "clearing_member_category", "corporation_sole_type", "country_code", "description",
|
||||||
|
"professional_sign", "legal_kind", "organization_type", "residence", "short_name", "full_name",
|
||||||
|
"short_name_eng", "full_name_eng"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
protected final String insertStatement = DbUtilsHelper.createUpdateOrInsert(getTableName(), getFields(), "id");
|
||||||
|
protected final String insertCompanyInfoStatement = DbUtilsHelper.createUpdateOrInsert("COMPANY_INFO", getFieldsForCompanyInfo(), "id");
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void store(Map<Long, CompanyUpdate> map) {
|
||||||
|
List<Object[]> batchArgs = new ArrayList<>();
|
||||||
|
List<Object[]> batchCompanyInfoArgs = new ArrayList<>();
|
||||||
|
|
||||||
|
for (Map.Entry<Long, CompanyUpdate> entry : map.entrySet()) {
|
||||||
|
CompanyUpdate companyUpdate = entry.getValue();
|
||||||
|
Company company = companyUpdate.getObject();
|
||||||
|
|
||||||
|
Object[] args = new Object[]{
|
||||||
|
companyUpdate.getId(),
|
||||||
|
TimeUtil.fromInstant(companyUpdate.getEventTime()),
|
||||||
|
companyUpdate.getUserId(),
|
||||||
|
|
||||||
|
company.getId(), // company_id
|
||||||
|
TimeUtil.fromInstant(company.getCreated()),
|
||||||
|
TimeUtil.fromInstant(company.getUpdated()),
|
||||||
|
company.getStatusId(),
|
||||||
|
company.getClearingCode(),
|
||||||
|
company.getExchangeCode()
|
||||||
|
};
|
||||||
|
batchArgs.add(args);
|
||||||
|
if (company.getProfile() != null) {
|
||||||
|
company.getProfile().setId(company.getId());//todo для точного соответствия id = company.id
|
||||||
|
company.getProfile().setCompanyId(company.getId());
|
||||||
|
List<Object> companyInfoArgs = new ArrayList<>();
|
||||||
|
companyInfoArgs.addAll(companyInfoToSQLArgs(company.getProfile(), companyUpdate));
|
||||||
|
|
||||||
|
batchCompanyInfoArgs.add(companyInfoArgs.toArray());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
batchInsertUpdate(insertStatement, batchArgs);
|
||||||
|
batchInsertUpdate(insertCompanyInfoStatement, batchCompanyInfoArgs);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Перечисление значений полей CompanyInfo.
|
||||||
|
* См. insertCompanyInfoStatement
|
||||||
|
*
|
||||||
|
* @param companyInfo должен быть заполнен id, company_id = company.id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
protected List<Object> companyInfoToSQLArgs(@NonNull CompanyInfo companyInfo, CompanyUpdate rootUpdate) {
|
||||||
|
List<Object> companyInfoArgs = new ArrayList<>(Arrays.asList(
|
||||||
|
rootUpdate.getId(),
|
||||||
|
TimeUtil.fromInstant(rootUpdate.getEventTime()),
|
||||||
|
rootUpdate.getUserId(),
|
||||||
|
|
||||||
|
companyInfo.getId(), // company_info_id
|
||||||
|
companyInfo.getCompanyId(),
|
||||||
|
companyInfo.getClearingMemberCategory(),
|
||||||
|
companyInfo.getCorporationSoleType(),
|
||||||
|
companyInfo.getCountryCode(),
|
||||||
|
companyInfo.getDescription(),
|
||||||
|
companyInfo.getProfessionalSign(),
|
||||||
|
companyInfo.getLegalKind(),
|
||||||
|
companyInfo.getOrganizationType(),
|
||||||
|
companyInfo.getResidence(),
|
||||||
|
companyInfo.getShortName(),
|
||||||
|
companyInfo.getFullName(),
|
||||||
|
companyInfo.getShortNameEng(),
|
||||||
|
companyInfo.getFullNameEng()
|
||||||
|
));
|
||||||
|
return companyInfoArgs;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
package ru.spcex.clearing.storage.businessobject;
|
package ru.spcex.clearing.storage.businessobject;
|
||||||
|
|
||||||
|
import org.springframework.dao.support.DataAccessUtils;
|
||||||
import org.springframework.jdbc.core.JdbcTemplate;
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.lang.NonNull;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import ru.clearing.classes.StaticData.Company.Company;
|
import ru.clearing.classes.StaticData.Company.Company;
|
||||||
import ru.clearing.classes.StaticData.Profile.CompanyInfo;
|
import ru.clearing.classes.StaticData.Profile.CompanyInfo;
|
||||||
|
|
@ -29,7 +31,16 @@ public class CompanyMapStore extends BusinessObjectMapStore<Company> {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String[] getFieldsForCompanyInfo() {
|
||||||
|
return new String[]{
|
||||||
|
"id", "company_id", "clearing_member_category", "corporation_sole_type", "country_code", "description",
|
||||||
|
"professional_sign", "legal_kind", "organization_type", "residence", "short_name", "full_name",
|
||||||
|
"short_name_eng", "full_name_eng"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
protected final String insertStatement = DbUtilsHelper.createUpdateOrInsert(getTableName(), getFields(), "id");
|
protected final String insertStatement = DbUtilsHelper.createUpdateOrInsert(getTableName(), getFields(), "id");
|
||||||
|
protected final String insertCompanyInfoStatement = DbUtilsHelper.createUpdateOrInsert("COMPANY_INFO", getFieldsForCompanyInfo(), "id");
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<Company> load(Collection<Long> keys) {
|
public Collection<Company> load(Collection<Long> keys) {
|
||||||
|
|
@ -42,8 +53,7 @@ public class CompanyMapStore extends BusinessObjectMapStore<Company> {
|
||||||
company.setStatusId(resultSet.getObject("status", Long.class));
|
company.setStatusId(resultSet.getObject("status", Long.class));
|
||||||
company.setClearingCode(resultSet.getObject("clearing_code", String.class));
|
company.setClearingCode(resultSet.getObject("clearing_code", String.class));
|
||||||
company.setExchangeCode(resultSet.getObject("exchange_code", String.class));
|
company.setExchangeCode(resultSet.getObject("exchange_code", String.class));
|
||||||
company.setProfile(new CompanyInfo());
|
company.setProfile(getCompanyInfo(company.getId()));
|
||||||
//todo Company loader CompanyInfo!
|
|
||||||
return company;
|
return company;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -51,12 +61,12 @@ public class CompanyMapStore extends BusinessObjectMapStore<Company> {
|
||||||
@Override
|
@Override
|
||||||
public void store(Map<Long, Company> map) {
|
public void store(Map<Long, Company> map) {
|
||||||
List<Object[]> batchArgs = new ArrayList<>();
|
List<Object[]> batchArgs = new ArrayList<>();
|
||||||
|
List<Object[]> batchCompanyInfoArgs = new ArrayList<>();
|
||||||
|
|
||||||
for (Map.Entry<Long, Company> entry : map.entrySet()) {
|
for (Map.Entry<Long, Company> entry : map.entrySet()) {
|
||||||
Company company = entry.getValue();
|
Company company = entry.getValue();
|
||||||
|
|
||||||
Object[] args = new Object[]{
|
Object[] args = new Object[]{
|
||||||
company.getId(),
|
|
||||||
company.getId(),
|
company.getId(),
|
||||||
TimeUtil.fromInstant(company.getCreated()),
|
TimeUtil.fromInstant(company.getCreated()),
|
||||||
TimeUtil.fromInstant(company.getUpdated()),
|
TimeUtil.fromInstant(company.getUpdated()),
|
||||||
|
|
@ -65,9 +75,77 @@ public class CompanyMapStore extends BusinessObjectMapStore<Company> {
|
||||||
company.getExchangeCode()
|
company.getExchangeCode()
|
||||||
};
|
};
|
||||||
batchArgs.add(args);
|
batchArgs.add(args);
|
||||||
company.getProfile();//todo Company loader Profile!
|
if (company.getProfile() != null) {
|
||||||
|
company.getProfile().setId(company.getId());//todo для точного соответствия id = company.id
|
||||||
|
company.getProfile().setCompanyId(company.getId());
|
||||||
|
List<Object> companyInfoArgs = new ArrayList<>();
|
||||||
|
companyInfoArgs.addAll(companyInfoToSQLArgs(company.getProfile()));
|
||||||
|
|
||||||
|
batchCompanyInfoArgs.add(companyInfoArgs.toArray());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
batchInsertUpdate(insertStatement, batchArgs);
|
batchInsertUpdate(insertStatement, batchArgs);
|
||||||
|
batchInsertUpdate(insertCompanyInfoStatement, batchCompanyInfoArgs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected CompanyInfo getCompanyInfo(Long id) {
|
||||||
|
if (id == null)
|
||||||
|
return null;
|
||||||
|
List<CompanyInfo> results = jdbcTemplate.query(
|
||||||
|
"SELECT * FROM COMPANY_INFO WHERE id = ?", new Object[]{id}, // todo id=comapny.id? Или сделать отдельный ID?
|
||||||
|
(rs, rowNum) -> {
|
||||||
|
CompanyInfo companyInfo = new CompanyInfo();
|
||||||
|
companyInfo.setId(rs.getObject("Id", Long.class));
|
||||||
|
companyInfo.setCompanyId(rs.getObject("CompanyId", Long.class));
|
||||||
|
companyInfo.setClearingMemberCategory(rs.getString("ClearingMemberCategory"));
|
||||||
|
companyInfo.setCorporationSoleType(rs.getString("CorporationSoleType"));
|
||||||
|
companyInfo.setCountryCode(rs.getString("CountryCode"));
|
||||||
|
companyInfo.setDescription(rs.getString("Description"));
|
||||||
|
companyInfo.setProfessionalSign(rs.getString("ProfessionalSign"));
|
||||||
|
companyInfo.setLegalKind(rs.getString("LegalKind"));
|
||||||
|
companyInfo.setOrganizationType(rs.getString("OrganizationType"));
|
||||||
|
companyInfo.setResidence(rs.getString("Residence"));
|
||||||
|
companyInfo.setShortName(rs.getString("ShortName"));
|
||||||
|
companyInfo.setFullName(rs.getString("FullName"));
|
||||||
|
companyInfo.setShortNameEng(rs.getString("ShortNameEng"));
|
||||||
|
companyInfo.setFullNameEng(rs.getString("FullNameEng"));
|
||||||
|
return companyInfo;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
CompanyInfo onceObject = DataAccessUtils.singleResult(results);
|
||||||
|
if (onceObject == null) {
|
||||||
|
log.warn("No row in table COMPANY_INFO where id={}. Create empty ", id);
|
||||||
|
onceObject = new CompanyInfo();
|
||||||
|
onceObject.setId(id); // чтобы не потерять id
|
||||||
|
}
|
||||||
|
return onceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Перечисление значений полей CompanyInfo.
|
||||||
|
* См. insertCompanyInfoStatement
|
||||||
|
*
|
||||||
|
* @param companyInfo должен быть заполнен id, company_id = company.id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
protected List<Object> companyInfoToSQLArgs(@NonNull CompanyInfo companyInfo) {
|
||||||
|
List<Object> companyInfoArgs = new ArrayList<>(Arrays.asList(
|
||||||
|
companyInfo.getId(),
|
||||||
|
companyInfo.getCompanyId(),
|
||||||
|
companyInfo.getClearingMemberCategory(),
|
||||||
|
companyInfo.getCorporationSoleType(),
|
||||||
|
companyInfo.getCountryCode(),
|
||||||
|
companyInfo.getDescription(),
|
||||||
|
companyInfo.getProfessionalSign(),
|
||||||
|
companyInfo.getLegalKind(),
|
||||||
|
companyInfo.getOrganizationType(),
|
||||||
|
companyInfo.getResidence(),
|
||||||
|
companyInfo.getShortName(),
|
||||||
|
companyInfo.getFullName(),
|
||||||
|
companyInfo.getShortNameEng(),
|
||||||
|
companyInfo.getFullNameEng()
|
||||||
|
));
|
||||||
|
return companyInfoArgs;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ public class HazelcastConfiguration {
|
||||||
config.addMapConfig(poolMapConfigs.map_ProfileDocument());
|
config.addMapConfig(poolMapConfigs.map_ProfileDocument());
|
||||||
config.addMapConfig(poolMapConfigs.map_Contact());
|
config.addMapConfig(poolMapConfigs.map_Contact());
|
||||||
config.addMapConfig(poolMapConfigs.map_Company());
|
config.addMapConfig(poolMapConfigs.map_Company());
|
||||||
//todo config.addMapConfig(poolMapConfigs.map_CompanyUpdate());
|
config.addMapConfig(poolMapConfigs.map_CompanyUpdate());
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import com.hazelcast.config.*;
|
||||||
import com.hazelcast.core.MapLoader;
|
import com.hazelcast.core.MapLoader;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import ru.spcex.clearing.storage.businessevent.CompanyUpdateMapStore;
|
||||||
import ru.spcex.clearing.storage.businessobject.CompanyMapStore;
|
import ru.spcex.clearing.storage.businessobject.CompanyMapStore;
|
||||||
import ru.spcex.clearing.storage.dictionary.*;
|
import ru.spcex.clearing.storage.dictionary.*;
|
||||||
import ru.spcex.clearing.storage.object.CompanyRoleSetMapStore;
|
import ru.spcex.clearing.storage.object.CompanyRoleSetMapStore;
|
||||||
|
|
@ -176,4 +177,10 @@ public class PoolMapConfigs {
|
||||||
.addMapIndexConfig(makeMapIndexConfig("companyId"));
|
.addMapIndexConfig(makeMapIndexConfig("companyId"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private CompanyUpdateMapStore companyUpdateMapStore;
|
||||||
|
|
||||||
|
public MapConfig map_CompanyUpdate() {
|
||||||
|
return makeDefaultMapConfig(IMDGDistributedNames.Map_CompanyUpdate, companyUpdateMapStore);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,10 @@ public final class IMDGDistributedNames {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final String Map_Company = "Map_Company";
|
public static final String Map_Company = "Map_Company";
|
||||||
|
public static final String Map_CompanyUpdate = "Map_CompanyUpdate";
|
||||||
public static final String Map_CompanyRoleSet = "Map_CompanyRoleSet";
|
public static final String Map_CompanyRoleSet = "Map_CompanyRoleSet";
|
||||||
public static final String Map_CompanySymbols = "Map_CompanySymbols";
|
public static final String Map_CompanySymbols = "Map_CompanySymbols";
|
||||||
public static final String Map_CompanyInfo = "Map_CompanyInfo";
|
// public static final String Map_CompanyInfo = "Map_CompanyInfo"; интегрировано в Map_Company
|
||||||
public static final String Map_Contact = "Map_Contact";
|
public static final String Map_Contact = "Map_Contact";
|
||||||
public static final String Map_ProfileDocument = "Map_ProfileDocument";
|
public static final String Map_ProfileDocument = "Map_ProfileDocument";
|
||||||
|
|
||||||
|
|
@ -24,4 +25,6 @@ public final class IMDGDistributedNames {
|
||||||
public static final String Map_OrganizationTypeDictionary = "Map_OrganizationTypeDictionary";
|
public static final String Map_OrganizationTypeDictionary = "Map_OrganizationTypeDictionary";
|
||||||
public static final String Map_WorkflowStatusDictionary = "Map_WorkflowStatusDictionary";
|
public static final String Map_WorkflowStatusDictionary = "Map_WorkflowStatusDictionary";
|
||||||
|
|
||||||
|
|
||||||
|
public static final String MAP_SEQUENCE_NAME = "MAP_SEQUENCE_NAME"; // todo вынести idGenerator отдельно и завернуть в метод, чтобы не напрямую обращаться.
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue