diff options
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao')
8 files changed, 492 insertions, 0 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionHistoryCassandraDaoImpl.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionHistoryCassandraDaoImpl.java new file mode 100644 index 0000000000..a50a8b7beb --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionHistoryCassandraDaoImpl.java @@ -0,0 +1,69 @@ +/*- + * ============LICENSE_START======================================================= + * SDC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.sdc.versioning.dao.impl; + +import com.datastax.driver.core.UDTValue; +import com.datastax.driver.mapping.Mapper; +import com.datastax.driver.mapping.Result; +import com.datastax.driver.mapping.UDTMapper; +import com.datastax.driver.mapping.annotations.Accessor; +import com.datastax.driver.mapping.annotations.Query; +import org.openecomp.core.dao.impl.CassandraBaseDao; +import org.openecomp.core.nosqldb.api.NoSqlDb; +import org.openecomp.core.nosqldb.factory.NoSqlDbFactory; +import org.openecomp.sdc.versioning.dao.VersionHistoryDao; +import org.openecomp.sdc.versioning.dao.types.VersionHistoryEntity; +import org.openecomp.sdc.versioning.dao.types.VersionableEntityId; + +import java.util.Collection; + +public class VersionHistoryCassandraDaoImpl extends CassandraBaseDao<VersionHistoryEntity> + implements VersionHistoryDao { + + private static NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface(); + private static Mapper<VersionHistoryEntity> mapper = + noSqlDb.getMappingManager().mapper(VersionHistoryEntity.class); + private static VersionHistoryAccessor accessor = + noSqlDb.getMappingManager().createAccessor(VersionHistoryAccessor.class); + private static UDTMapper<VersionableEntityId> versionedEntityIdMapper = + noSqlDb.getMappingManager().udtMapper(VersionableEntityId.class); + + @Override + protected Mapper<VersionHistoryEntity> getMapper() { + return mapper; + } + + @Override + protected Object[] getKeys(VersionHistoryEntity entity) { + return new Object[]{versionedEntityIdMapper.toUDT(entity.getEntityId())}; + } + + @Override + public Collection<VersionHistoryEntity> list(VersionHistoryEntity entity) { + return accessor.getAll(versionedEntityIdMapper.toUDT(entity.getEntityId())).all(); + } + + @Accessor + interface VersionHistoryAccessor { + @Query("select * from version_history where entity_id=?") + Result<VersionHistoryEntity> getAll(UDTValue entityId); + } +} diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionHistoryDaoFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionHistoryDaoFactoryImpl.java new file mode 100644 index 0000000000..ac1c7e9634 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionHistoryDaoFactoryImpl.java @@ -0,0 +1,33 @@ +/*- + * ============LICENSE_START======================================================= + * SDC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.sdc.versioning.dao.impl; + +import org.openecomp.sdc.versioning.dao.VersionHistoryDao; +import org.openecomp.sdc.versioning.dao.VersionHistoryDaoFactory; + +public class VersionHistoryDaoFactoryImpl extends VersionHistoryDaoFactory { + private static final VersionHistoryDao INSTANCE = new VersionHistoryCassandraDaoImpl(); + + @Override + public VersionHistoryDao createInterface() { + return INSTANCE; + } +} diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDaoFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDaoFactoryImpl.java new file mode 100644 index 0000000000..46c6a9d795 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDaoFactoryImpl.java @@ -0,0 +1,33 @@ +/*- + * ============LICENSE_START======================================================= + * SDC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.sdc.versioning.dao.impl; + +import org.openecomp.sdc.versioning.dao.VersionInfoDao; +import org.openecomp.sdc.versioning.dao.VersionInfoDaoFactory; + +public class VersionInfoDaoFactoryImpl extends VersionInfoDaoFactory { + private static VersionInfoDao INSTANCE = new VersionInfoDaoImpl(); + + @Override + public VersionInfoDao createInterface() { + return INSTANCE; + } +} diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDaoImpl.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDaoImpl.java new file mode 100644 index 0000000000..a45c211f94 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDaoImpl.java @@ -0,0 +1,66 @@ +/*- + * ============LICENSE_START======================================================= + * SDC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.sdc.versioning.dao.impl; + +import com.datastax.driver.mapping.Mapper; +import com.datastax.driver.mapping.Result; +import com.datastax.driver.mapping.annotations.Accessor; +import com.datastax.driver.mapping.annotations.Query; +import org.openecomp.core.dao.impl.CassandraBaseDao; +import org.openecomp.core.nosqldb.api.NoSqlDb; +import org.openecomp.core.nosqldb.factory.NoSqlDbFactory; +import org.openecomp.sdc.versioning.dao.VersionInfoDao; +import org.openecomp.sdc.versioning.dao.types.VersionInfoEntity; + +import java.util.Collection; + +public class VersionInfoDaoImpl extends CassandraBaseDao<VersionInfoEntity> + implements VersionInfoDao { + + private static NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface(); + private static Mapper<VersionInfoEntity> mapper = + noSqlDb.getMappingManager().mapper(VersionInfoEntity.class); + private static VersionInfoAccessor accessor = + noSqlDb.getMappingManager().createAccessor(VersionInfoAccessor.class); + //private static UDTMapper<VersionableEntityId> versionedEntityIdMapper = noSqlDb + //.getMappingManager().udtMapper(VersionableEntityId.class); + + @Override + protected Mapper<VersionInfoEntity> getMapper() { + return mapper; + } + + @Override + protected Object[] getKeys(VersionInfoEntity entity) { + return new Object[]{entity.getEntityType(), entity.getEntityId()}; + } + + @Override + public Collection<VersionInfoEntity> list(VersionInfoEntity entity) { + return accessor.getAll(entity.getEntityType()).all(); + } + + @Accessor + interface VersionInfoAccessor { + @Query("select * from version_info where entity_type=?") + Result<VersionInfoEntity> getAll(String entityType); + } +} diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDeletedDaoFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDeletedDaoFactoryImpl.java new file mode 100644 index 0000000000..9163018a85 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDeletedDaoFactoryImpl.java @@ -0,0 +1,34 @@ +/*- + * ============LICENSE_START======================================================= + * SDC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.sdc.versioning.dao.impl; + + +import org.openecomp.sdc.versioning.dao.VersionInfoDeletedDao; +import org.openecomp.sdc.versioning.dao.VersionInfoDeletedDaoFactory; + +public class VersionInfoDeletedDaoFactoryImpl extends VersionInfoDeletedDaoFactory { + private static VersionInfoDeletedDao INSTANCE = new VersionInfoDeletedDaoImpl(); + + @Override + public VersionInfoDeletedDao createInterface() { + return INSTANCE; + } +} diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDeletedDaoImpl.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDeletedDaoImpl.java new file mode 100644 index 0000000000..82e4edcd80 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionInfoDeletedDaoImpl.java @@ -0,0 +1,65 @@ +/*- + * ============LICENSE_START======================================================= + * SDC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.sdc.versioning.dao.impl; + +import com.datastax.driver.mapping.Mapper; +import com.datastax.driver.mapping.Result; +import com.datastax.driver.mapping.annotations.Accessor; +import com.datastax.driver.mapping.annotations.Query; +import org.openecomp.core.dao.impl.CassandraBaseDao; +import org.openecomp.core.nosqldb.api.NoSqlDb; +import org.openecomp.core.nosqldb.factory.NoSqlDbFactory; +import org.openecomp.sdc.versioning.dao.VersionInfoDeletedDao; +import org.openecomp.sdc.versioning.dao.types.VersionInfoDeletedEntity; + +import java.util.Collection; + +public class VersionInfoDeletedDaoImpl extends CassandraBaseDao<VersionInfoDeletedEntity> + implements VersionInfoDeletedDao { + + private static NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface(); + private static Mapper<VersionInfoDeletedEntity> mapper = + noSqlDb.getMappingManager().mapper(VersionInfoDeletedEntity.class); + private static VersionInfoAccessor accessor = + noSqlDb.getMappingManager().createAccessor(VersionInfoAccessor.class); + + + @Override + protected Mapper<VersionInfoDeletedEntity> getMapper() { + return mapper; + } + + @Override + protected Object[] getKeys(VersionInfoDeletedEntity entity) { + return new Object[]{entity.getEntityType(), entity.getEntityId()}; + } + + @Override + public Collection<VersionInfoDeletedEntity> list(VersionInfoDeletedEntity entity) { + return accessor.getAll(entity.getEntityType()).all(); + } + + @Accessor + interface VersionInfoAccessor { + @Query("select * from version_info_deleted where entity_type=?") + Result<VersionInfoDeletedEntity> getAll(String entityType); + } +} diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionableEntityDaoCassandraImpl.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionableEntityDaoCassandraImpl.java new file mode 100644 index 0000000000..f02ea89e34 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionableEntityDaoCassandraImpl.java @@ -0,0 +1,159 @@ +/*- + * ============LICENSE_START======================================================= + * SDC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.sdc.versioning.dao.impl; + +import com.datastax.driver.core.ColumnDefinitions; +import com.datastax.driver.core.ResultSet; +import com.datastax.driver.core.Row; +import com.datastax.driver.mapping.UDTMapper; +import org.openecomp.core.nosqldb.api.NoSqlDb; +import org.openecomp.core.nosqldb.factory.NoSqlDbFactory; +import org.openecomp.core.util.UniqueValueUtil; +import org.openecomp.core.utilities.CommonMethods; +import org.openecomp.sdc.versioning.dao.VersionableEntityDao; +import org.openecomp.sdc.versioning.dao.types.Version; +import org.openecomp.sdc.versioning.types.UniqueValueMetadata; +import org.openecomp.sdc.versioning.types.VersionableEntityMetadata; + +import org.slf4j.LoggerFactory; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Function; +import java.util.stream.Collectors; + +class VersionableEntityDaoCassandraImpl implements VersionableEntityDao { + + private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface(); + private static org.slf4j.Logger Logger = + LoggerFactory.getLogger(VersionableEntityDaoCassandraImpl.class); + private static UDTMapper<Version> versionMapper = + noSqlDb.getMappingManager().udtMapper(Version.class); + + private static String commaSeparatedQuestionMarks(int size) { + StringBuilder sb = new StringBuilder(size * 2 - 1); + for (int i = 0; i < size; i++) { + if (i > 0) { + sb.append(','); + } + sb.append('?'); + } + return sb.toString(); + + } + + @Override + public void initVersion(VersionableEntityMetadata metadata, String entityId, Version baseVersion, + Version newVersion) { + ResultSet rows = loadVersionRows(metadata, entityId, baseVersion); + List<String> columnNames = + rows.getColumnDefinitions().asList().stream().map(ColumnDefinitions.Definition::getName) + .collect(Collectors.toList()); + + String insertCql = String.format("insert into %s (%s) values (%s)", metadata.getName(), + CommonMethods.listToSeparatedString(columnNames, ','), + commaSeparatedQuestionMarks(columnNames.size())); + Logger.debug("insertCql", insertCql); + + for (Row row : rows) { + List<Object> columnValues = new ArrayList<>(); + Map<String, Object> columnNameToValue = new HashMap<>(); + + for (String columnName : columnNames) { + if (metadata.getVersionIdentifierName().equals(columnName)) { + columnValues.add(versionMapper.toUDT(newVersion)); + columnNameToValue.put(columnName, newVersion.toString()); + } else { + Object value = row.getObject(columnName); + columnValues.add(value); + columnNameToValue.put(columnName, value); + } + } + + initRowUniqueValues(metadata.getUniqueValuesMetadata(), columnNameToValue); + + noSqlDb.execute(insertCql, columnValues.toArray()); + } + } + + private ResultSet loadVersionRows(VersionableEntityMetadata metadata, String entityId, + Version version) { + String selectCql = String.format("select * from %s where %s=? and %s=?", metadata.getName(), + metadata.getIdentifierName(), metadata.getVersionIdentifierName()); + Logger.debug("selectCql", selectCql); + Logger.debug("entityId", entityId); + Logger.debug("version", version); + + return noSqlDb.execute(selectCql, entityId, versionMapper.toUDT(version)); + } + + @Override + public void deleteVersion(VersionableEntityMetadata metadata, String entityId, + Version versionToDelete) { + deleteRowsUniqueValues(metadata, entityId, versionToDelete); + + String deleteCql = String.format("delete from %s where %s=? and %s=?", metadata.getName(), + metadata.getIdentifierName(), metadata.getVersionIdentifierName()); + noSqlDb.execute(deleteCql, entityId, versionMapper.toUDT(versionToDelete)); + } + + private void initRowUniqueValues(List<UniqueValueMetadata> metadata, + Map<String, Object> columnNameToValue) { + for (UniqueValueMetadata uniqueMetadata : metadata) { + List<String> uniqueValueCombination = uniqueMetadata.getUniqueConstraintIdentifiers().stream() + .map(colName -> (String) columnNameToValue.get(colName)).collect(Collectors.toList()); + UniqueValueUtil.createUniqueValue(uniqueMetadata.getType(), + uniqueValueCombination.toArray(new String[uniqueValueCombination.size()])); + } + } + + private void deleteRowUniqueValues(List<UniqueValueMetadata> metadata, + Map<String, Object> columnNameToValue) { + for (UniqueValueMetadata uniqueMetadata : metadata) { + List<String> uniqueValueCombination = uniqueMetadata.getUniqueConstraintIdentifiers().stream() + .map(colName -> (String) columnNameToValue.get(colName)).collect(Collectors.toList()); + UniqueValueUtil.deleteUniqueValue(uniqueMetadata.getType(), + uniqueValueCombination.toArray(new String[uniqueValueCombination.size()])); + } + } + + private void deleteRowsUniqueValues(VersionableEntityMetadata metadata, String entityId, + Version version) { + if (metadata.getUniqueValuesMetadata().isEmpty()) { + return; + } + ResultSet rows = loadVersionRows(metadata, entityId, version); + List<String> columnNames = + rows.getColumnDefinitions().asList().stream().map(ColumnDefinitions.Definition::getName) + .collect(Collectors.toList()); + + for (Row row : rows) { + Map<String, Object> columnNameToValue = + columnNames.stream().filter(name -> row.getObject(name) != null).collect(Collectors + .toMap(Function.identity(), + columnName -> metadata.getVersionIdentifierName().equals(columnName) ? version + .toString() : row.getObject(columnName))); + deleteRowUniqueValues(metadata.getUniqueValuesMetadata(), columnNameToValue); + } + } +} diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionableEntityDaoFactoryImpl.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionableEntityDaoFactoryImpl.java new file mode 100644 index 0000000000..8ec0814fc9 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/dao/impl/VersionableEntityDaoFactoryImpl.java @@ -0,0 +1,33 @@ +/*- + * ============LICENSE_START======================================================= + * SDC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.sdc.versioning.dao.impl; + +import org.openecomp.sdc.versioning.dao.VersionableEntityDao; +import org.openecomp.sdc.versioning.dao.VersionableEntityDaoFactory; + +public class VersionableEntityDaoFactoryImpl extends VersionableEntityDaoFactory { + private static VersionableEntityDao INSTANCE = new VersionableEntityDaoCassandraImpl(); + + @Override + public VersionableEntityDao createInterface() { + return INSTANCE; + } +} |