-
Notifications
You must be signed in to change notification settings - Fork 427
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2249 from constantine2nd/develop
Scheduler
- Loading branch information
Showing
5 changed files
with
81 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package code.scheduler | ||
|
||
import code.util.MappedUUID | ||
import net.liftweb.mapper._ | ||
|
||
class JobScheduler extends JobSchedulerTrait with LongKeyedMapper[JobScheduler] with IdPK with CreatedUpdated { | ||
|
||
def getSingleton = JobScheduler | ||
|
||
object JobId extends MappedUUID(this) | ||
object Name extends MappedString(this, 100) | ||
object ApiInstanceId extends MappedString(this, 100) | ||
|
||
override def primaryKey: Long = id.get | ||
override def jobId: String = JobId.get | ||
override def name: String = Name.get | ||
override def apiInstanceId: String = ApiInstanceId.get | ||
|
||
} | ||
|
||
object JobScheduler extends JobScheduler with LongKeyedMetaMapper[JobScheduler] { | ||
override def dbIndexes: List[BaseIndex[JobScheduler]] = UniqueIndex(JobId) :: super.dbIndexes | ||
} | ||
|
||
|
||
|
||
|
||
|
8 changes: 8 additions & 0 deletions
8
obp-api/src/main/scala/code/scheduler/JobSchedulerTrait.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package code.scheduler | ||
|
||
trait JobSchedulerTrait { | ||
def primaryKey: Long | ||
def jobId: String | ||
def name: String | ||
def apiInstanceId: String | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters