Class SequenceGeneratorServiceImpl
- java.lang.Object
-
- co.mastermindcms.modules.services.SequenceGeneratorServiceImpl
-
- All Implemented Interfaces:
SequenceGeneratorService
@Service public class SequenceGeneratorServiceImpl extends java.lang.Object implements SequenceGeneratorService
-
-
Field Summary
Fields Modifier and Type Field Description private org.springframework.data.mongodb.core.MongoOperations
mongoOperations
-
Constructor Summary
Constructors Constructor Description SequenceGeneratorServiceImpl(org.springframework.data.mongodb.core.MongoOperations mongoOperations)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
generateSequence(java.lang.String seqName)
This method generate a database sequence.void
removeSequences()
This method remove a database sequence.
-
-
-
Method Detail
-
generateSequence
public long generateSequence(java.lang.String seqName)
Description copied from interface:SequenceGeneratorService
This method generate a database sequence.- Specified by:
generateSequence
in interfaceSequenceGeneratorService
- Parameters:
seqName
- field name for database entity,from which will be generated- Returns:
- sequence value as number
-
removeSequences
public void removeSequences()
Description copied from interface:SequenceGeneratorService
This method remove a database sequence.- Specified by:
removeSequences
in interfaceSequenceGeneratorService
-
-