diff --git a/core/amber/src/main/scala/edu/uci/ics/amber/engine/architecture/scheduling/CostEstimator.scala b/core/amber/src/main/scala/edu/uci/ics/amber/engine/architecture/scheduling/CostEstimator.scala index ed1732f1d38..c0f82313597 100644 --- a/core/amber/src/main/scala/edu/uci/ics/amber/engine/architecture/scheduling/CostEstimator.scala +++ b/core/amber/src/main/scala/edu/uci/ics/amber/engine/architecture/scheduling/CostEstimator.scala @@ -1,18 +1,17 @@ package edu.uci.ics.amber.engine.architecture.scheduling -import edu.uci.ics.amber.core.storage.{DocumentFactory, StorageConfig} +import edu.uci.ics.amber.core.storage.DocumentFactory import edu.uci.ics.amber.core.tuple.Tuple +import edu.uci.ics.amber.core.virtualidentity.ActorVirtualIdentity import edu.uci.ics.amber.core.workflow.WorkflowContext import edu.uci.ics.amber.engine.architecture.scheduling.DefaultCostEstimator.DEFAULT_OPERATOR_COST import edu.uci.ics.amber.engine.common.AmberLogging -import edu.uci.ics.amber.core.virtualidentity.ActorVirtualIdentity import edu.uci.ics.texera.dao.SqlServer import edu.uci.ics.texera.dao.SqlServer.withTransaction import edu.uci.ics.texera.dao.jooq.generated.Tables.{WORKFLOW_EXECUTIONS, WORKFLOW_VERSION} -import org.jooq.types.UInteger -import scala.util.{Failure, Success, Try} import java.net.URI +import scala.util.{Failure, Success, Try} /** * A cost estimator should estimate a cost of running a region under the given resource constraints as units. @@ -85,11 +84,7 @@ class DefaultCostEstimator( val uriString: String = withTransaction( SqlServer - .getInstance( - StorageConfig.jdbcUrl, - StorageConfig.jdbcUsername, - StorageConfig.jdbcPassword - ) + .getInstance() .createDSLContext() ) { context => context @@ -99,7 +94,7 @@ class DefaultCostEstimator( .on(WORKFLOW_VERSION.VID.eq(WORKFLOW_EXECUTIONS.VID)) .where( WORKFLOW_VERSION.WID - .eq(UInteger.valueOf(wid)) + .eq(wid.toInt) .and(WORKFLOW_EXECUTIONS.STATUS.eq(3.toByte)) ) .orderBy(WORKFLOW_EXECUTIONS.STARTING_TIME.desc()) diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/ComputingUnitMaster.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/ComputingUnitMaster.scala index a46bc20bb84..ca7de7e7592 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/ComputingUnitMaster.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/ComputingUnitMaster.scala @@ -2,7 +2,7 @@ package edu.uci.ics.texera.web import com.fasterxml.jackson.module.scala.DefaultScalaModule import com.typesafe.scalalogging.LazyLogging -import edu.uci.ics.amber.core.storage.DocumentFactory +import edu.uci.ics.amber.core.storage.{DocumentFactory, StorageConfig} import edu.uci.ics.amber.core.storage.util.mongo.MongoDatabaseManager import edu.uci.ics.amber.core.workflow.{PhysicalPlan, WorkflowContext} import edu.uci.ics.amber.engine.architecture.controller.ControllerConfig @@ -16,6 +16,7 @@ import edu.uci.ics.amber.engine.common.client.AmberClient import edu.uci.ics.amber.engine.common.storage.SequentialRecordStorage import edu.uci.ics.amber.engine.common.{AmberConfig, AmberRuntime, Utils} import edu.uci.ics.amber.core.virtualidentity.ExecutionIdentity +import edu.uci.ics.texera.dao.SqlServer import edu.uci.ics.texera.web.auth.JwtAuth.setupJwtAuth import edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowExecutions import edu.uci.ics.texera.web.resource.WorkflowWebsocketResource @@ -98,6 +99,12 @@ class ComputingUnitMaster extends io.dropwizard.Application[Configuration] with override def run(configuration: Configuration, environment: Environment): Unit = { + SqlServer.initConnection( + StorageConfig.jdbcUrl, + StorageConfig.jdbcUsername, + StorageConfig.jdbcPassword + ) + val webSocketUpgradeFilter = WebSocketUpgradeFilter.configureContext(environment.getApplicationContext) webSocketUpgradeFilter.getFactory.getPolicy.setIdleTimeout(Duration.ofHours(1).toMillis) @@ -149,7 +156,7 @@ class ComputingUnitMaster extends io.dropwizard.Application[Configuration] with */ private def cleanExecutions( executions: List[WorkflowExecutions], - statusChangeFunc: Byte => Byte + statusChangeFunc: Short => Short ): Unit = { // drop the collection and update the status to ABORTED executions.foreach(execEntry => { diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/ComputingUnitWorker.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/ComputingUnitWorker.scala index b8302a8aee8..a93e3faf076 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/ComputingUnitWorker.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/ComputingUnitWorker.scala @@ -26,6 +26,7 @@ object ComputingUnitWorker { def main(args: Array[String]): Unit = { val argMap = parseArgs(args) + // start actor system worker node AmberRuntime.startActorWorker(argMap.get(Symbol("serverAddr")).asInstanceOf[Option[String]]) } diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/ServletAwareConfigurator.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/ServletAwareConfigurator.scala index ce0e65913bc..5f8257ca89c 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/ServletAwareConfigurator.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/ServletAwareConfigurator.scala @@ -4,7 +4,6 @@ import com.typesafe.scalalogging.LazyLogging import edu.uci.ics.texera.web.auth.JwtAuth.jwtConsumer import edu.uci.ics.texera.dao.jooq.generated.tables.pojos.User import org.apache.http.client.utils.URLEncodedUtils -import org.jooq.types.UInteger import java.net.URI import java.nio.charset.Charset @@ -39,7 +38,7 @@ class ServletAwareConfigurator extends ServerEndpointConfig.Configurator with La config.getUserProperties.put( classOf[User].getName, new User( - UInteger.valueOf(claims.getClaimValue("userId").asInstanceOf[Long]), + claims.getClaimValue("userId").asInstanceOf[Long].toInt, claims.getSubject, String.valueOf(claims.getClaimValue("email").asInstanceOf[String]), null, diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/TexeraWebApplication.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/TexeraWebApplication.scala index b5a52b47542..be2e9691eeb 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/TexeraWebApplication.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/TexeraWebApplication.scala @@ -4,9 +4,11 @@ import com.fasterxml.jackson.databind.module.SimpleModule import com.fasterxml.jackson.module.scala.DefaultScalaModule import com.github.dirkraft.dropwizard.fileassets.FileAssetsBundle import com.typesafe.scalalogging.LazyLogging +import edu.uci.ics.amber.core.storage.StorageConfig import edu.uci.ics.amber.core.storage.util.dataset.GitVersionControlLocalFileStorage import edu.uci.ics.amber.engine.common.Utils import edu.uci.ics.amber.util.PathUtils +import edu.uci.ics.texera.dao.SqlServer import edu.uci.ics.texera.web.auth.JwtAuth.setupJwtAuth import edu.uci.ics.texera.web.auth.SessionUser import edu.uci.ics.texera.web.resource._ @@ -98,6 +100,12 @@ class TexeraWebApplication // serve backend at /api environment.jersey.setUrlPattern("/api/*") + SqlServer.initConnection( + StorageConfig.jdbcUrl, + StorageConfig.jdbcUsername, + StorageConfig.jdbcPassword + ) + // redirect all 404 to index page, according to Angular routing requirements val eph = new ErrorPageErrorHandler eph.addErrorPage(404, "/") @@ -148,5 +156,6 @@ class TexeraWebApplication environment.jersey.register(classOf[AdminExecutionResource]) environment.jersey.register(classOf[UserQuotaResource]) environment.jersey.register(classOf[AIAssistantResource]) + } } diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/WebsocketInput.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/WebsocketInput.scala index bc4a3eddba4..2e3506c21b0 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/WebsocketInput.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/WebsocketInput.scala @@ -3,17 +3,16 @@ package edu.uci.ics.texera.web import edu.uci.ics.texera.web.model.websocket.request.TexeraWebSocketRequest import io.reactivex.rxjava3.disposables.Disposable import io.reactivex.rxjava3.subjects.PublishSubject -import org.jooq.types.UInteger import scala.reflect.{ClassTag, classTag} class WebsocketInput(errorHandler: Throwable => Unit) { - private val wsInput = PublishSubject.create[(TexeraWebSocketRequest, Option[UInteger])]() + private val wsInput = PublishSubject.create[(TexeraWebSocketRequest, Option[Integer])]() def subscribe[T <: TexeraWebSocketRequest: ClassTag]( - callback: (T, Option[UInteger]) => Unit + callback: (T, Option[Integer]) => Unit ): Disposable = { - wsInput.subscribe((evt: (TexeraWebSocketRequest, Option[UInteger])) => { + wsInput.subscribe((evt: (TexeraWebSocketRequest, Option[Integer])) => { evt._1 match { case req: T if classTag[T].runtimeClass.isInstance(req) => try { @@ -28,7 +27,7 @@ class WebsocketInput(errorHandler: Throwable => Unit) { }) } - def onNext(req: TexeraWebSocketRequest, uidOpt: Option[UInteger]): Unit = { + def onNext(req: TexeraWebSocketRequest, uidOpt: Option[Integer]): Unit = { wsInput.onNext((req, uidOpt)) } diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/auth/GuestAuthFilter.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/auth/GuestAuthFilter.scala index 318a12c8f2d..398d2affabb 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/auth/GuestAuthFilter.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/auth/GuestAuthFilter.scala @@ -1,7 +1,7 @@ package edu.uci.ics.texera.web.auth import edu.uci.ics.texera.web.auth.GuestAuthFilter.GUEST -import edu.uci.ics.texera.dao.jooq.generated.enums.UserRole +import edu.uci.ics.texera.dao.jooq.generated.enums.UserRoleEnum import edu.uci.ics.texera.dao.jooq.generated.tables.pojos.User import io.dropwizard.auth.AuthFilter @@ -18,7 +18,7 @@ import javax.ws.rs.core.SecurityContext override protected def newInstance = new GuestAuthFilter } - val GUEST: User = new User(null, "guest", null, null, null, UserRole.REGULAR, null) + val GUEST: User = new User(null, "guest", null, null, null, null, UserRoleEnum.REGULAR) } @PreMatching diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/auth/SessionUser.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/auth/SessionUser.scala index baee51b24fb..e3c722e96ba 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/auth/SessionUser.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/auth/SessionUser.scala @@ -1,8 +1,7 @@ package edu.uci.ics.texera.web.auth -import edu.uci.ics.texera.dao.jooq.generated.enums.UserRole +import edu.uci.ics.texera.dao.jooq.generated.enums.UserRoleEnum import edu.uci.ics.texera.dao.jooq.generated.tables.pojos.User -import org.jooq.types.UInteger import java.security.Principal @@ -11,11 +10,11 @@ class SessionUser(val user: User) extends Principal { override def getName: String = user.getName - def getUid: UInteger = user.getUid + def getUid: Integer = user.getUid def getEmail: String = user.getEmail def getGoogleId: String = user.getGoogleId - def isRoleOf(role: UserRole): Boolean = user.getRole == role + def isRoleOf(role: UserRoleEnum): Boolean = user.getRole == role } diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/auth/UserAuthenticator.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/auth/UserAuthenticator.scala index 2a4947dc2ce..05c331ec683 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/auth/UserAuthenticator.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/auth/UserAuthenticator.scala @@ -1,10 +1,10 @@ package edu.uci.ics.texera.web.auth import com.typesafe.scalalogging.LazyLogging -import edu.uci.ics.texera.dao.jooq.generated.enums.UserRole +import edu.uci.ics.texera.dao.jooq.generated.enums.UserRoleEnum import edu.uci.ics.texera.dao.jooq.generated.tables.pojos.User import io.dropwizard.auth.Authenticator -import org.jooq.types.UInteger + import org.jose4j.jwt.consumer.JwtContext import java.util.Optional @@ -16,10 +16,11 @@ object UserAuthenticator extends Authenticator[JwtContext, SessionUser] with Laz try { val userName = context.getJwtClaims.getSubject val email = context.getJwtClaims.getClaimValue("email").asInstanceOf[String] - val userId = UInteger.valueOf(context.getJwtClaims.getClaimValue("userId").asInstanceOf[Long]) - val role = UserRole.valueOf(context.getJwtClaims.getClaimValue("role").asInstanceOf[String]) + val userId = context.getJwtClaims.getClaimValue("userId").asInstanceOf[Long].toInt + val role = + UserRoleEnum.valueOf(context.getJwtClaims.getClaimValue("role").asInstanceOf[String]) val googleId = context.getJwtClaims.getClaimValue("googleId").asInstanceOf[String] - val user = new User(userId, userName, email, null, googleId, role, null) + val user = new User(userId, userName, email, null, googleId, null, role) Optional.of(new SessionUser(user)) } catch { case e: Exception => diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/auth/UserRoleAuthorizer.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/auth/UserRoleAuthorizer.scala index 67ceade63ab..40322e881aa 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/auth/UserRoleAuthorizer.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/auth/UserRoleAuthorizer.scala @@ -1,10 +1,10 @@ package edu.uci.ics.texera.web.auth -import edu.uci.ics.texera.dao.jooq.generated.enums.UserRole +import edu.uci.ics.texera.dao.jooq.generated.enums.UserRoleEnum import io.dropwizard.auth.Authorizer object UserRoleAuthorizer extends Authorizer[SessionUser] { override def authorize(user: SessionUser, role: String): Boolean = { - user.isRoleOf(UserRole.valueOf(role)) + user.isRoleOf(UserRoleEnum.valueOf(role)) } } diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/CollaborationResource.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/CollaborationResource.scala index ac782c93102..8c995bc6ef2 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/CollaborationResource.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/CollaborationResource.scala @@ -9,7 +9,6 @@ import edu.uci.ics.texera.web.model.collab.response.HeartBeatResponse import edu.uci.ics.texera.dao.jooq.generated.tables.pojos.User import edu.uci.ics.texera.web.resource.CollaborationResource._ import edu.uci.ics.texera.web.resource.dashboard.user.workflow.WorkflowAccessResource -import org.jooq.types.UInteger import javax.websocket.server.ServerEndpoint import javax.websocket.{OnClose, OnMessage, OnOpen, Session} @@ -25,7 +24,7 @@ object CollaborationResource { final val DUMMY_WID = -1 private def checkIsReadOnly(wId: Int, uId: Int): Boolean = { - !WorkflowAccessResource.hasWriteAccess(UInteger.valueOf(wId), UInteger.valueOf(uId)) + !WorkflowAccessResource.hasWriteAccess(Integer.valueOf(wId), Integer.valueOf(uId)) } } diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/UserConfigResource.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/UserConfigResource.scala index ff364962ee9..26420098b80 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/UserConfigResource.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/UserConfigResource.scala @@ -1,11 +1,10 @@ package edu.uci.ics.texera.web.resource -import edu.uci.ics.amber.core.storage.StorageConfig import edu.uci.ics.texera.dao.SqlServer -import edu.uci.ics.texera.web.auth.SessionUser import edu.uci.ics.texera.dao.jooq.generated.Tables.USER_CONFIG import edu.uci.ics.texera.dao.jooq.generated.tables.daos.UserConfigDao import edu.uci.ics.texera.dao.jooq.generated.tables.pojos.{User, UserConfig} +import edu.uci.ics.texera.web.auth.SessionUser import io.dropwizard.auth.Auth import javax.annotation.security.RolesAllowed @@ -25,7 +24,7 @@ import scala.jdk.CollectionConverters.CollectionHasAsScala class UserConfigResource { final private lazy val userDictionaryDao = new UserConfigDao( SqlServer - .getInstance(StorageConfig.jdbcUrl, StorageConfig.jdbcUsername, StorageConfig.jdbcPassword) + .getInstance() .createDSLContext() .configuration ) @@ -43,7 +42,7 @@ class UserConfigResource { */ private def getDict(user: User): Map[String, String] = { SqlServer - .getInstance(StorageConfig.jdbcUrl, StorageConfig.jdbcUsername, StorageConfig.jdbcPassword) + .getInstance() .createDSLContext() .select() .from(USER_CONFIG) @@ -79,7 +78,7 @@ class UserConfigResource { */ private def getValueByKey(user: User, key: String): String = { SqlServer - .getInstance(StorageConfig.jdbcUrl, StorageConfig.jdbcUsername, StorageConfig.jdbcPassword) + .getInstance() .createDSLContext() .fetchOne( USER_CONFIG, @@ -118,7 +117,7 @@ class UserConfigResource { private def dictEntryExists(user: User, key: String): Boolean = { userDictionaryDao.existsById( SqlServer - .getInstance(StorageConfig.jdbcUrl, StorageConfig.jdbcUsername, StorageConfig.jdbcPassword) + .getInstance() .createDSLContext() .newRecord(USER_CONFIG.UID, USER_CONFIG.KEY) .values(user.getUid, key) @@ -154,7 +153,7 @@ class UserConfigResource { private def deleteDictEntry(user: User, key: String): Unit = { userDictionaryDao.deleteById( SqlServer - .getInstance(StorageConfig.jdbcUrl, StorageConfig.jdbcUsername, StorageConfig.jdbcPassword) + .getInstance() .createDSLContext() .newRecord(USER_CONFIG.UID, USER_CONFIG.KEY) .values(user.getUid, key) diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/auth/AuthResource.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/auth/AuthResource.scala index 513d5dbeaef..4d4689a5988 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/auth/AuthResource.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/auth/AuthResource.scala @@ -1,6 +1,5 @@ package edu.uci.ics.texera.web.resource.auth -import edu.uci.ics.amber.core.storage.StorageConfig import edu.uci.ics.amber.engine.common.AmberConfig import edu.uci.ics.texera.dao.SqlServer import edu.uci.ics.texera.web.auth.JwtAuth._ @@ -11,7 +10,7 @@ import edu.uci.ics.texera.web.model.http.request.auth.{ } import edu.uci.ics.texera.web.model.http.response.TokenIssueResponse import edu.uci.ics.texera.dao.jooq.generated.Tables.USER -import edu.uci.ics.texera.dao.jooq.generated.enums.UserRole +import edu.uci.ics.texera.dao.jooq.generated.enums.UserRoleEnum import edu.uci.ics.texera.dao.jooq.generated.tables.daos.UserDao import edu.uci.ics.texera.dao.jooq.generated.tables.pojos.User import edu.uci.ics.texera.web.resource.auth.AuthResource._ @@ -24,7 +23,7 @@ object AuthResource { final private lazy val userDao = new UserDao( SqlServer - .getInstance(StorageConfig.jdbcUrl, StorageConfig.jdbcUsername, StorageConfig.jdbcPassword) + .getInstance() .createDSLContext() .configuration ) @@ -40,7 +39,7 @@ object AuthResource { def retrieveUserByUsernameAndPassword(name: String, password: String): Option[User] = { Option( SqlServer - .getInstance(StorageConfig.jdbcUrl, StorageConfig.jdbcUsername, StorageConfig.jdbcPassword) + .getInstance() .createDSLContext() .select() .from(USER) @@ -88,7 +87,7 @@ class AuthResource { val user = new User user.setName(username) user.setEmail(username) - user.setRole(UserRole.ADMIN) + user.setRole(UserRoleEnum.ADMIN) // hash the plain text password user.setPassword(new StrongPasswordEncryptor().encryptPassword(request.password)) userDao.insert(user) diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/auth/GoogleAuthResource.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/auth/GoogleAuthResource.scala index 175a62fc2ab..4cac1eb3059 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/auth/GoogleAuthResource.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/auth/GoogleAuthResource.scala @@ -3,7 +3,6 @@ package edu.uci.ics.texera.web.resource.auth import com.google.api.client.googleapis.auth.oauth2.GoogleIdTokenVerifier import com.google.api.client.http.javanet.NetHttpTransport import com.google.api.client.json.gson.GsonFactory -import edu.uci.ics.amber.core.storage.StorageConfig import edu.uci.ics.amber.engine.common.AmberConfig import edu.uci.ics.texera.dao.SqlServer import edu.uci.ics.texera.web.auth.JwtAuth.{ @@ -13,7 +12,7 @@ import edu.uci.ics.texera.web.auth.JwtAuth.{ jwtToken } import edu.uci.ics.texera.web.model.http.response.TokenIssueResponse -import edu.uci.ics.texera.dao.jooq.generated.enums.UserRole +import edu.uci.ics.texera.dao.jooq.generated.enums.UserRoleEnum import edu.uci.ics.texera.dao.jooq.generated.tables.daos.UserDao import edu.uci.ics.texera.dao.jooq.generated.tables.pojos.User import edu.uci.ics.texera.web.resource.auth.GoogleAuthResource.userDao @@ -25,7 +24,7 @@ import javax.ws.rs.core.MediaType object GoogleAuthResource { final private lazy val userDao = new UserDao( SqlServer - .getInstance(StorageConfig.jdbcUrl, StorageConfig.jdbcUsername, StorageConfig.jdbcPassword) + .getInstance() .createDSLContext() .configuration ) @@ -90,7 +89,7 @@ class GoogleAuthResource { user.setName(googleName) user.setEmail(googleEmail) user.setGoogleId(googleId) - user.setRole(UserRole.INACTIVE) + user.setRole(UserRoleEnum.INACTIVE) user.setGoogleAvatar(googleAvatar) userDao.insert(user) user diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/DashboardResource.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/DashboardResource.scala index e14b0d839e7..86464b7ba02 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/DashboardResource.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/DashboardResource.scala @@ -8,7 +8,7 @@ import edu.uci.ics.texera.web.resource.dashboard.SearchQueryBuilder.{ALL_RESOURC import edu.uci.ics.texera.web.resource.dashboard.user.dataset.DatasetResource.DashboardDataset import edu.uci.ics.texera.web.resource.dashboard.user.workflow.WorkflowResource.DashboardWorkflow import io.dropwizard.auth.Auth -import org.jooq.types.UInteger + import org.jooq.{Field, OrderField} import java.util @@ -24,7 +24,7 @@ object DashboardResource { dataset: Option[DashboardDataset] = None ) - case class UserInfo(userId: UInteger, userName: String, googleAvatar: Option[String]) + case class UserInfo(userId: Integer, userName: String, googleAvatar: Option[String]) case class DashboardSearchResult(results: List[DashboardClickableFileEntry], more: Boolean) @@ -53,10 +53,10 @@ object DashboardResource { @QueryParam("modifiedDateStart") @DefaultValue("") modifiedStartDate: String = "", @QueryParam("modifiedDateEnd") @DefaultValue("") modifiedEndDate: String = "", @QueryParam("owner") owners: java.util.List[String] = new util.ArrayList(), - @QueryParam("id") workflowIDs: java.util.List[UInteger] = new util.ArrayList(), + @QueryParam("id") workflowIDs: java.util.List[Integer] = new util.ArrayList(), @QueryParam("operator") operators: java.util.List[String] = new util.ArrayList(), - @QueryParam("projectId") projectIds: java.util.List[UInteger] = new util.ArrayList(), - @QueryParam("datasetId") datasetIds: java.util.List[UInteger] = new util.ArrayList(), + @QueryParam("projectId") projectIds: java.util.List[Integer] = new util.ArrayList(), + @QueryParam("datasetId") datasetIds: java.util.List[Integer] = new util.ArrayList(), @QueryParam("start") @DefaultValue("0") offset: Int = 0, @QueryParam("count") @DefaultValue("20") count: Int = 20, @QueryParam("orderBy") @DefaultValue("EditTimeDesc") orderBy: String = "EditTimeDesc" @@ -180,9 +180,9 @@ class DashboardResource { @GET @Path("/resultsOwnersInfo") def resultsOwnersInfo( - @QueryParam("userIds") userIds: util.List[UInteger] - ): util.Map[UInteger, UserInfo] = { - val scalaUserIds: Set[UInteger] = userIds.asScala.toSet + @QueryParam("userIds") userIds: util.List[Integer] + ): util.Map[Integer, UserInfo] = { + val scalaUserIds: Set[Integer] = userIds.asScala.toSet val records = context .select(USER.UID, USER.NAME, USER.GOOGLE_AVATAR) diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/DatasetSearchQueryBuilder.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/DatasetSearchQueryBuilder.scala index b83903b7e1f..3c28963dd71 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/DatasetSearchQueryBuilder.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/DatasetSearchQueryBuilder.scala @@ -1,7 +1,7 @@ package edu.uci.ics.texera.web.resource.dashboard import edu.uci.ics.texera.dao.jooq.generated.Tables.{DATASET, DATASET_USER_ACCESS} -import edu.uci.ics.texera.dao.jooq.generated.enums.DatasetUserAccessPrivilege +import edu.uci.ics.texera.dao.jooq.generated.enums.PrivilegeEnum import edu.uci.ics.texera.dao.jooq.generated.tables.User.USER import edu.uci.ics.texera.dao.jooq.generated.tables.pojos.{Dataset, User} import edu.uci.ics.texera.web.resource.dashboard.DashboardResource.DashboardClickableFileEntry @@ -14,7 +14,7 @@ import edu.uci.ics.texera.web.resource.dashboard.FulltextSearchQueryUtils.{ import edu.uci.ics.texera.web.resource.dashboard.user.dataset.DatasetResource import edu.uci.ics.texera.web.resource.dashboard.user.dataset.DatasetResource.DashboardDataset import org.jooq.impl.DSL -import org.jooq.types.UInteger + import org.jooq.{Condition, GroupField, Record, TableLike} import scala.jdk.CollectionConverters.CollectionHasAsScala @@ -35,13 +35,13 @@ object DatasetSearchQueryBuilder extends SearchQueryBuilder { * constructs the FROM clause for querying datasets with specific access controls. * * Parameter: - * - uid: UInteger - Represents the unique identifier of the current user. + * - uid: Integer - Represents the unique identifier of the current user. * - uid is 'null' if the user is not logged in or performing a public search. * - Otherwise, `uid` holds the identifier for the logged-in user. * - includePublic - Boolean - Specifies whether to include public datasets in the result. */ override protected def constructFromClause( - uid: UInteger, + uid: Integer, params: DashboardResource.SearchQueryParams, includePublic: Boolean = false ): TableLike[_] = { @@ -57,14 +57,14 @@ object DatasetSearchQueryBuilder extends SearchQueryBuilder { if (uid == null) { // If `uid` is null, the user is not logged in or performing a public search // We only select datasets marked as public - condition = DATASET.IS_PUBLIC.eq(1.toByte) + condition = DATASET.IS_PUBLIC.eq(true) } else { // When `uid` is present, we add a condition to only include datasets with direct user access. val userAccessCondition = DATASET_USER_ACCESS.UID.eq(uid) if (includePublic) { // If `includePublic` is true, we extend visibility to public datasets as well. - condition = userAccessCondition.or(DATASET.IS_PUBLIC.eq(1.toByte)) + condition = userAccessCondition.or(DATASET.IS_PUBLIC.eq(true)) } else { condition = userAccessCondition } @@ -73,7 +73,7 @@ object DatasetSearchQueryBuilder extends SearchQueryBuilder { } override protected def constructWhereClause( - uid: UInteger, + uid: Integer, params: DashboardResource.SearchQueryParams ): Condition = { val splitKeywords = params.keywords.asScala @@ -99,11 +99,11 @@ object DatasetSearchQueryBuilder extends SearchQueryBuilder { } override protected def getGroupByFields: Seq[GroupField] = { - Seq(DATASET.DID) + Seq.empty } override protected def toEntryImpl( - uid: UInteger, + uid: Integer, record: Record ): DashboardResource.DashboardClickableFileEntry = { val dataset = record.into(DATASET).into(classOf[Dataset]) @@ -114,7 +114,7 @@ object DatasetSearchQueryBuilder extends SearchQueryBuilder { record .get( DATASET_USER_ACCESS.PRIVILEGE, - classOf[DatasetUserAccessPrivilege] + classOf[PrivilegeEnum] ), dataset.getOwnerUid == uid, List(), diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/FulltextSearchQueryUtils.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/FulltextSearchQueryUtils.scala index 167d4831378..0538840d65d 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/FulltextSearchQueryUtils.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/FulltextSearchQueryUtils.scala @@ -15,31 +15,66 @@ object FulltextSearchQueryUtils { fields: List[Field[String]] ): Condition = { if (fields.isEmpty) return noCondition() + + // Filter out empty keywords and trim val trimmedKeywords = keywords.filter(_.nonEmpty).map(_.trim) - val fullFieldNames = fields.map(_.toString.replace("\"", "")) - val indexedCompoundFields = fullFieldNames.mkString(",") - trimmedKeywords.foldLeft(noCondition()) { (acc, key) => - val words = key.split("\\s+") - acc.and( - condition( - s"MATCH($indexedCompoundFields) AGAINST('${words.mkString("+", " +", "")}' IN BOOLEAN MODE)", - key - ) - ) + + // Build a SQL expression that concatenates all fields with spaces, + // then feeds them into to_tsvector('english', ...). + // E.g.: to_tsvector('english', COALESCE(firstName, '') || ' ' || COALESCE(lastName, '')) + val combinedFields = fields + .map(f => s"COALESCE($f, '')") // handle null -> '' + .mkString(" || ' ' || ") + + // Fold each keyword into the final Condition + trimmedKeywords.foldLeft(noCondition()) { (acc, keyword) => + // For each "keyword", split it into words + val words = keyword.split("\\s+").filter(_.nonEmpty) + + // In Postgres tsquery syntax, an AND search uses '&' between terms + // e.g.: apple & banana + val tsQuery = words.mkString(" & ") + + // Build the raw SQL string for Postgres FTS + // e.g.: to_tsvector('english', COALESCE(firstName, '') || ' ' || COALESCE(lastName, '')) @@ to_tsquery('english', 'apple & banana') + val conditionExpr = + s"to_tsvector('english', $combinedFields) @@ to_tsquery('english', '$tsQuery')" + + // 'condition(...)' is presumably your helper method that takes a raw SQL string + // and an optional binding for debug/logging + acc.and(condition(conditionExpr, keyword)) } } def getSubstringSearchFilter( keywords: Seq[String], - fields: List[Field[String]] + fields: List[Field[String]], + caseInsensitive: Boolean = false ): Condition = { + // If no fields, return a "no-op" condition if (fields.isEmpty) return noCondition() + + // Trim and discard empty keywords val trimmedKeywords = keywords.filter(_.nonEmpty).map(_.trim) - val fullFieldNames = fields.map(_.toString.replace("\"", "")) - fullFieldNames.foldLeft(noCondition()) { (acc, fieldName) => - acc.or(trimmedKeywords.foldLeft(noCondition()) { (accInner, key) => - accInner.and(s"$fieldName LIKE '%$key%'") - }) + + // For each field, create a condition that all keywords must match in that field + // e.g. field LIKE '%keyword1%' AND field LIKE '%keyword2%' + val fieldConditions: Seq[Condition] = fields.map { field => + trimmedKeywords.foldLeft[Condition](noCondition()) { (acc, key) => + val likeCondition = + if (caseInsensitive) + field.likeIgnoreCase(s"%$key%") // Postgres-specific case-insensitive match + else field.like(s"%$key%") // standard SQL LIKE + if (acc == noCondition()) likeCondition + else acc.and(likeCondition) + } + } + + // Finally, OR across all fields + // (field1Condition) OR (field2Condition) OR ... + fieldConditions.foldLeft[Condition](noCondition()) { (acc, cond) => + if (acc == noCondition()) cond + else acc.or(cond) } } @@ -113,14 +148,23 @@ object FulltextSearchQueryUtils { operators: java.util.List[String], field: Field[String] ): Condition = { + // Convert to a Set to avoid duplicates val operatorSet = operators.asScala.toSet + // Start with a "no condition" (logical TRUE) so we can accumulate var fieldFilter = noCondition() - for (operator <- operatorSet) { - val quotes = "\"" - val searchKey = - "%" + quotes + "operatorType" + quotes + ":" + quotes + operator + quotes + "%" - fieldFilter = fieldFilter.or(field.likeIgnoreCase(searchKey)) + + // For each operator, build the substring pattern + operatorSet.foreach { operator => + // e.g. => % "operatorType":"someOperator" % + val searchKey = s"""%"operatorType":"$operator"%""" + + // Use jOOQ's likeIgnoreCase for case-insensitive matching + val cond = field.likeIgnoreCase(searchKey) + + // Accumulate with OR + fieldFilter = fieldFilter.or(cond) } + fieldFilter } diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/ProjectSearchQueryBuilder.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/ProjectSearchQueryBuilder.scala index a76d2b72a1b..9bb6a86cb63 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/ProjectSearchQueryBuilder.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/ProjectSearchQueryBuilder.scala @@ -10,7 +10,7 @@ import edu.uci.ics.texera.web.resource.dashboard.FulltextSearchQueryUtils.{ getSubstringSearchFilter } import org.jooq.impl.DSL -import org.jooq.types.UInteger + import org.jooq.{Condition, GroupField, Record, TableLike} import scala.jdk.CollectionConverters.CollectionHasAsScala @@ -29,7 +29,7 @@ object ProjectSearchQueryBuilder extends SearchQueryBuilder { ) override protected def constructFromClause( - uid: UInteger, + uid: Integer, params: DashboardResource.SearchQueryParams, includePublic: Boolean = false ): TableLike[_] = { @@ -40,7 +40,7 @@ object ProjectSearchQueryBuilder extends SearchQueryBuilder { } override protected def constructWhereClause( - uid: UInteger, + uid: Integer, params: DashboardResource.SearchQueryParams ): Condition = { val splitKeywords = params.keywords.asScala @@ -68,7 +68,7 @@ object ProjectSearchQueryBuilder extends SearchQueryBuilder { override protected def getGroupByFields: Seq[GroupField] = Seq.empty override def toEntryImpl( - uid: UInteger, + uid: Integer, record: Record ): DashboardResource.DashboardClickableFileEntry = { val dp = record.into(PROJECT).into(classOf[Project]) diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/SearchQueryBuilder.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/SearchQueryBuilder.scala index f2fb9cb746d..f129ba43042 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/SearchQueryBuilder.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/SearchQueryBuilder.scala @@ -1,6 +1,5 @@ package edu.uci.ics.texera.web.resource.dashboard -import edu.uci.ics.amber.core.storage.StorageConfig import edu.uci.ics.texera.dao.SqlServer import edu.uci.ics.texera.web.resource.dashboard.DashboardResource.{ DashboardClickableFileEntry, @@ -8,12 +7,11 @@ import edu.uci.ics.texera.web.resource.dashboard.DashboardResource.{ } import edu.uci.ics.texera.web.resource.dashboard.SearchQueryBuilder.context import org.jooq._ -import org.jooq.types.UInteger object SearchQueryBuilder { final lazy val context = SqlServer - .getInstance(StorageConfig.jdbcUrl, StorageConfig.jdbcUsername, StorageConfig.jdbcPassword) + .getInstance() .createDSLContext() val FILE_RESOURCE_TYPE = "file" val WORKFLOW_RESOURCE_TYPE = "workflow" @@ -27,30 +25,30 @@ trait SearchQueryBuilder { protected val mappedResourceSchema: UnifiedResourceSchema protected def constructFromClause( - uid: UInteger, + uid: Integer, params: SearchQueryParams, includePublic: Boolean = false ): TableLike[_] - protected def constructWhereClause(uid: UInteger, params: SearchQueryParams): Condition + protected def constructWhereClause(uid: Integer, params: SearchQueryParams): Condition protected def getGroupByFields: Seq[GroupField] = Seq.empty - protected def toEntryImpl(uid: UInteger, record: Record): DashboardClickableFileEntry + protected def toEntryImpl(uid: Integer, record: Record): DashboardClickableFileEntry private def translateRecord(record: Record): Record = mappedResourceSchema.translateRecord(record) - def toEntry(uid: UInteger, record: Record): DashboardClickableFileEntry = { + def toEntry(uid: Integer, record: Record): DashboardClickableFileEntry = { toEntryImpl(uid, translateRecord(record)) } final def constructQuery( - uid: UInteger, + uid: Integer, params: SearchQueryParams, includePublic: Boolean ): SelectHavingStep[Record] = { val query: SelectGroupByStep[Record] = context - .select(mappedResourceSchema.allFields: _*) + .selectDistinct(mappedResourceSchema.allFields: _*) .from(constructFromClause(uid, params, includePublic)) .where(constructWhereClause(uid, params)) val groupByFields = getGroupByFields diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/UnifiedResourceSchema.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/UnifiedResourceSchema.scala index 6b526d54443..84d67994b3b 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/UnifiedResourceSchema.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/UnifiedResourceSchema.scala @@ -1,14 +1,9 @@ package edu.uci.ics.texera.web.resource.dashboard -import edu.uci.ics.amber.core.storage.StorageConfig import edu.uci.ics.texera.dao.SqlServer -import edu.uci.ics.texera.dao.jooq.generated.enums.{ - DatasetUserAccessPrivilege, - WorkflowUserAccessPrivilege -} +import edu.uci.ics.texera.dao.jooq.generated.enums.PrivilegeEnum import edu.uci.ics.texera.web.resource.dashboard.UnifiedResourceSchema.context import org.jooq.impl.DSL -import org.jooq.types.UInteger import org.jooq.{Field, Record} import java.sql.Timestamp @@ -33,31 +28,29 @@ object UnifiedResourceSchema { val resourceLastModifiedTimeField: Field[_] = DSL.field(DSL.name(resourceLastModifiedTimeAlias)) final lazy val context = SqlServer - .getInstance(StorageConfig.jdbcUrl, StorageConfig.jdbcUsername, StorageConfig.jdbcPassword) + .getInstance() .createDSLContext() def apply( resourceType: Field[String] = DSL.inline(""), name: Field[String] = DSL.inline(""), description: Field[String] = DSL.inline(""), - creationTime: Field[Timestamp] = DSL.inline(null, classOf[Timestamp]), - lastModifiedTime: Field[Timestamp] = DSL.inline(null, classOf[Timestamp]), - ownerId: Field[UInteger] = DSL.inline(null, classOf[UInteger]), - wid: Field[UInteger] = DSL.inline(null, classOf[UInteger]), - workflowUserAccess: Field[WorkflowUserAccessPrivilege] = - DSL.inline(null, classOf[WorkflowUserAccessPrivilege]), + creationTime: Field[Timestamp] = DSL.cast(null, classOf[Timestamp]), + lastModifiedTime: Field[Timestamp] = DSL.cast(null, classOf[Timestamp]), + ownerId: Field[Integer] = DSL.cast(null, classOf[Integer]), + wid: Field[Integer] = DSL.cast(null, classOf[Integer]), + workflowUserAccess: Field[PrivilegeEnum] = DSL.castNull(classOf[PrivilegeEnum]), projectsOfWorkflow: Field[String] = DSL.inline(""), - uid: Field[UInteger] = DSL.inline(null, classOf[UInteger]), + uid: Field[Integer] = DSL.cast(null, classOf[Integer]), userName: Field[String] = DSL.inline(""), userEmail: Field[String] = DSL.inline(""), - pid: Field[UInteger] = DSL.inline(null, classOf[UInteger]), - projectOwnerId: Field[UInteger] = DSL.inline(null, classOf[UInteger]), + pid: Field[Integer] = DSL.cast(null, classOf[Integer]), + projectOwnerId: Field[Integer] = DSL.cast(null, classOf[Integer]), projectColor: Field[String] = DSL.inline(""), - did: Field[UInteger] = DSL.inline(null, classOf[UInteger]), - datasetStoragePath: Field[String] = DSL.inline(null, classOf[String]), - isDatasetPublic: Field[java.lang.Byte] = DSL.inline(null, classOf[java.lang.Byte]), - datasetUserAccess: Field[DatasetUserAccessPrivilege] = - DSL.inline(null, classOf[DatasetUserAccessPrivilege]) + did: Field[Integer] = DSL.cast(null, classOf[Integer]), + datasetStoragePath: Field[String] = DSL.cast(null, classOf[String]), + isDatasetPublic: Field[java.lang.Boolean] = DSL.cast(null, classOf[java.lang.Boolean]), + datasetUserAccess: Field[PrivilegeEnum] = DSL.castNull(classOf[PrivilegeEnum]) ): UnifiedResourceSchema = { new UnifiedResourceSchema( Seq( @@ -94,31 +87,31 @@ object UnifiedResourceSchema { * - `description`: A textual description of the resource as a `String`. * - `creationTime`: The timestamp when the resource was created, as a `Timestamp`. * - `lastModifiedTime`: The timestamp of the last modification to the resource, as a `Timestamp` (applicable to workflows). - * - `ownerId`: The identifier of the resource's owner, as a `UInteger`. + * - `ownerId`: The identifier of the resource's owner, as a `Integer`. * * Attributes specific to workflows: - * - `wid`: Workflow ID, as a `UInteger`. - * - `workflowUserAccess`: Access privileges associated with the workflow, as a `WorkflowUserAccessPrivilege`. + * - `wid`: Workflow ID, as a `Integer`. + * - `workflowUserAccess`: Access privileges associated with the workflow, as a `PrivilegeEnum`. * - `projectsOfWorkflow`: IDs of projects associated with the workflow, concatenated as a `String`. - * - `uid`: User ID associated with the workflow, as a `UInteger`. + * - `uid`: User ID associated with the workflow, as a `Integer`. * - `userName`: Name of the user associated with the workflow, as a `String`. * - `userEmail`: Email of the user associated with the workflow, as a `String`. * * Attributes specific to projects: - * - `pid`: Project ID, as a `UInteger`. - * - `projectOwnerId`: ID of the project owner, as a `UInteger`. + * - `pid`: Project ID, as a `Integer`. + * - `projectOwnerId`: ID of the project owner, as a `Integer`. * - `projectColor`: Color associated with the project, as a `String`. * * Attributes specific to files: - * - `fid`: File ID, as a `UInteger`. + * - `fid`: File ID, as a `Integer`. * - `fileUploadTime`: Timestamp when the file was uploaded, as a `Timestamp`. * - `filePath`: Path of the file, as a `String`. - * - `fileSize`: Size of the file, as a `UInteger`. + * - `fileSize`: Size of the file, as a `Integer`. * - `fileUserAccess`: Access privileges for the file, as a `UserFileAccessPrivilege`. * * Attributes specific to datasets: - * - `did`: Dataset ID, as a `UInteger`. - * - `datasetUserAccess`: Access privileges for the dataset, as a `DatasetUserAccessPrivilege` + * - `did`: Dataset ID, as a `Integer`. + * - `datasetUserAccess`: Access privileges for the dataset, as a `PrivilegeEnum` */ class UnifiedResourceSchema private ( fieldMappingSeq: Seq[(Field[_], Field[_])] diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/WorkflowSearchQueryBuilder.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/WorkflowSearchQueryBuilder.scala index 5ade3dff372..2735fc58002 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/WorkflowSearchQueryBuilder.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/WorkflowSearchQueryBuilder.scala @@ -7,7 +7,6 @@ import edu.uci.ics.texera.web.resource.dashboard.FulltextSearchQueryUtils._ import edu.uci.ics.texera.web.resource.dashboard.user.workflow.WorkflowResource.DashboardWorkflow import org.jooq.impl.DSL import org.jooq.impl.DSL.groupConcatDistinct -import org.jooq.types.UInteger import org.jooq.{Condition, GroupField, Record, TableLike} import scala.jdk.CollectionConverters.CollectionHasAsScala @@ -31,7 +30,7 @@ object WorkflowSearchQueryBuilder extends SearchQueryBuilder { } override protected def constructFromClause( - uid: UInteger, + uid: Integer, params: DashboardResource.SearchQueryParams, includePublic: Boolean = false ): TableLike[_] = { @@ -49,12 +48,12 @@ object WorkflowSearchQueryBuilder extends SearchQueryBuilder { var condition: Condition = DSL.trueCondition() if (uid == null) { - condition = WORKFLOW.IS_PUBLIC.eq(1.toByte) + condition = WORKFLOW.IS_PUBLIC.eq(true) } else { val privateAccessCondition = WORKFLOW_USER_ACCESS.UID.eq(uid).or(PROJECT_USER_ACCESS.UID.eq(uid)) if (includePublic) { - condition = privateAccessCondition.or(WORKFLOW.IS_PUBLIC.eq(1.toByte)) + condition = privateAccessCondition.or(WORKFLOW.IS_PUBLIC.eq(true)) } else { condition = privateAccessCondition } @@ -64,7 +63,7 @@ object WorkflowSearchQueryBuilder extends SearchQueryBuilder { } override protected def constructWhereClause( - uid: UInteger, + uid: Integer, params: DashboardResource.SearchQueryParams ): Condition = { val splitKeywords = params.keywords.asScala @@ -107,11 +106,20 @@ object WorkflowSearchQueryBuilder extends SearchQueryBuilder { } override protected def getGroupByFields: Seq[GroupField] = { - Seq(WORKFLOW.WID) + Seq( + WORKFLOW.NAME, + WORKFLOW.DESCRIPTION, + WORKFLOW.CREATION_TIME, + WORKFLOW.WID, + WORKFLOW.LAST_MODIFIED_TIME, + WORKFLOW_USER_ACCESS.PRIVILEGE, + WORKFLOW_OF_USER.UID, + USER.NAME + ) } override def toEntryImpl( - uid: UInteger, + uid: Integer, record: Record ): DashboardResource.DashboardClickableFileEntry = { val pidField = groupConcatDistinct(WORKFLOW_OF_PROJECT.PID) @@ -123,13 +131,13 @@ object WorkflowSearchQueryBuilder extends SearchQueryBuilder { record.into(USER).getName, record.into(WORKFLOW).into(classOf[Workflow]), if (record.get(pidField) == null) { - List[UInteger]() + List[Integer]() } else { record .get(pidField) .asInstanceOf[String] .split(',') - .map(number => UInteger.valueOf(number)) + .map(number => Integer.valueOf(number)) .toList }, record.into(USER).getUid diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/admin/execution/AdminExecutionResource.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/admin/execution/AdminExecutionResource.scala index 9a280f921f1..79a994cf924 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/admin/execution/AdminExecutionResource.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/admin/execution/AdminExecutionResource.scala @@ -1,13 +1,11 @@ package edu.uci.ics.texera.web.resource.dashboard.admin.execution -import edu.uci.ics.amber.core.storage.StorageConfig import edu.uci.ics.texera.dao.SqlServer -import edu.uci.ics.texera.web.auth.SessionUser import edu.uci.ics.texera.dao.jooq.generated.Tables._ +import edu.uci.ics.texera.web.auth.SessionUser import edu.uci.ics.texera.web.resource.dashboard.admin.execution.AdminExecutionResource._ import io.dropwizard.auth.Auth import org.jooq.impl.DSL -import org.jooq.types.UInteger import javax.annotation.security.RolesAllowed import javax.ws.rs._ @@ -20,15 +18,15 @@ import scala.jdk.CollectionConverters._ object AdminExecutionResource { final private lazy val context = SqlServer - .getInstance(StorageConfig.jdbcUrl, StorageConfig.jdbcUsername, StorageConfig.jdbcPassword) + .getInstance() .createDSLContext() case class dashboardExecution( workflowName: String, - workflowId: UInteger, + workflowId: Integer, userName: String, - userId: UInteger, - executionId: UInteger, + userId: Integer, + executionId: Integer, executionStatus: String, executionTime: Double, executionName: String, @@ -37,7 +35,7 @@ object AdminExecutionResource { access: Boolean ) - def mapToName(code: Byte): String = { + def mapToName(code: Short): String = { code match { case 0 => "READY" case 1 => "RUNNING" @@ -169,7 +167,7 @@ class AdminExecutionResource { .select(WORKFLOW_USER_ACCESS.WID) .from(WORKFLOW_USER_ACCESS) .where(WORKFLOW_USER_ACCESS.UID.eq(current_user.getUid)) - .fetchInto(classOf[UInteger]) + .fetchInto(classOf[Integer]) // Calculate the statistics needed for each execution. executions diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/admin/user/AdminUserResource.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/admin/user/AdminUserResource.scala index dccb8d70b05..e1e1e0f3fcd 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/admin/user/AdminUserResource.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/admin/user/AdminUserResource.scala @@ -1,14 +1,12 @@ package edu.uci.ics.texera.web.resource.dashboard.admin.user -import edu.uci.ics.amber.core.storage.StorageConfig import edu.uci.ics.texera.dao.SqlServer -import edu.uci.ics.texera.dao.jooq.generated.enums.UserRole +import edu.uci.ics.texera.dao.jooq.generated.enums.UserRoleEnum import edu.uci.ics.texera.dao.jooq.generated.tables.daos.UserDao import edu.uci.ics.texera.dao.jooq.generated.tables.pojos.User import edu.uci.ics.texera.web.resource.dashboard.admin.user.AdminUserResource.userDao import edu.uci.ics.texera.web.resource.dashboard.user.quota.UserQuotaResource._ import org.jasypt.util.password.StrongPasswordEncryptor -import org.jooq.types.UInteger import java.util import javax.annotation.security.RolesAllowed @@ -17,7 +15,7 @@ import javax.ws.rs.core.{MediaType, Response} object AdminUserResource { final private lazy val context = SqlServer - .getInstance(StorageConfig.jdbcUrl, StorageConfig.jdbcUsername, StorageConfig.jdbcPassword) + .getInstance() .createDSLContext() final private lazy val userDao = new UserDao(context.configuration) } @@ -35,7 +33,7 @@ class AdminUserResource { @Path("/list") @Produces(Array(MediaType.APPLICATION_JSON)) def listUser(): util.List[User] = { - userDao.fetchRangeOfUid(UInteger.MIN, UInteger.MAX) + userDao.fetchRangeOfUid(Integer.MIN_VALUE, Integer.MAX_VALUE) } @PUT @@ -59,28 +57,28 @@ class AdminUserResource { val newUser = new User newUser.setName("User" + random) newUser.setPassword(new StrongPasswordEncryptor().encryptPassword(random)) - newUser.setRole(UserRole.INACTIVE) + newUser.setRole(UserRoleEnum.INACTIVE) userDao.insert(newUser) } @GET @Path("/created_workflows") @Produces(Array(MediaType.APPLICATION_JSON)) - def getCreatedWorkflow(@QueryParam("user_id") user_id: UInteger): List[Workflow] = { + def getCreatedWorkflow(@QueryParam("user_id") user_id: Integer): List[Workflow] = { getUserCreatedWorkflow(user_id) } @GET @Path("/access_workflows") @Produces(Array(MediaType.APPLICATION_JSON)) - def getAccessedWorkflow(@QueryParam("user_id") user_id: UInteger): util.List[UInteger] = { + def getAccessedWorkflow(@QueryParam("user_id") user_id: Integer): util.List[Integer] = { getUserAccessedWorkflow(user_id) } @GET @Path("/mongodb_size") @Produces(Array(MediaType.APPLICATION_JSON)) - def mongoDBSize(@QueryParam("user_id") user_id: UInteger): Array[MongoStorage] = { + def mongoDBSize(@QueryParam("user_id") user_id: Integer): Array[MongoStorage] = { getUserMongoDBSize(user_id) } diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/hub/EntityTables.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/hub/EntityTables.scala index 259441cbe97..22b803364f1 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/hub/EntityTables.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/hub/EntityTables.scala @@ -1,40 +1,32 @@ package edu.uci.ics.texera.web.resource.dashboard.hub -import edu.uci.ics.texera.dao.jooq.generated.tables.records.{ - DatasetRecord, - DatasetUserLikesRecord, - DatasetViewCountRecord, - WorkflowRecord, - WorkflowUserClonesRecord, - WorkflowUserLikesRecord, - WorkflowViewCountRecord -} -import org.jooq._ -import org.jooq.types.UInteger import edu.uci.ics.texera.dao.jooq.generated.Tables._ +import edu.uci.ics.texera.dao.jooq.generated.tables.records._ +import org.jooq._ object EntityTables { // ==================== BASE TABLE ==================== sealed trait BaseEntityTable { type R <: Record val table: Table[R] - val isPublicColumn: TableField[R, java.lang.Byte] - val idColumn: TableField[R, UInteger] + val isPublicColumn: TableField[R, java.lang.Boolean] + val idColumn: TableField[R, Integer] } object BaseEntityTable { case object WorkflowTable extends BaseEntityTable { override type R = WorkflowRecord override val table: Table[WorkflowRecord] = WORKFLOW - override val isPublicColumn: TableField[WorkflowRecord, java.lang.Byte] = WORKFLOW.IS_PUBLIC - override val idColumn: TableField[WorkflowRecord, UInteger] = WORKFLOW.WID + override val isPublicColumn: TableField[WorkflowRecord, java.lang.Boolean] = + WORKFLOW.IS_PUBLIC + override val idColumn: TableField[WorkflowRecord, Integer] = WORKFLOW.WID } case object DatasetTable extends BaseEntityTable { override type R = DatasetRecord override val table: Table[DatasetRecord] = DATASET - override val isPublicColumn: TableField[DatasetRecord, java.lang.Byte] = DATASET.IS_PUBLIC - override val idColumn: TableField[DatasetRecord, UInteger] = DATASET.DID + override val isPublicColumn: TableField[DatasetRecord, java.lang.Boolean] = DATASET.IS_PUBLIC + override val idColumn: TableField[DatasetRecord, Integer] = DATASET.DID } def apply(entityType: String): BaseEntityTable = { @@ -54,8 +46,8 @@ object EntityTables { type R <: Record val table: Table[R] - val uidColumn: TableField[R, UInteger] - val idColumn: TableField[R, UInteger] + val uidColumn: TableField[R, Integer] + val idColumn: TableField[R, Integer] } // ==================== LIKE TABLE ==================== @@ -65,17 +57,17 @@ object EntityTables { case object WorkflowLikeTable extends LikeTable { override type R = WorkflowUserLikesRecord override val table: Table[WorkflowUserLikesRecord] = WORKFLOW_USER_LIKES - override val uidColumn: TableField[WorkflowUserLikesRecord, UInteger] = + override val uidColumn: TableField[WorkflowUserLikesRecord, Integer] = WORKFLOW_USER_LIKES.UID - override val idColumn: TableField[WorkflowUserLikesRecord, UInteger] = WORKFLOW_USER_LIKES.WID + override val idColumn: TableField[WorkflowUserLikesRecord, Integer] = WORKFLOW_USER_LIKES.WID } case object DatasetLikeTable extends LikeTable { override type R = DatasetUserLikesRecord override val table: Table[DatasetUserLikesRecord] = DATASET_USER_LIKES - override val uidColumn: TableField[DatasetUserLikesRecord, UInteger] = + override val uidColumn: TableField[DatasetUserLikesRecord, Integer] = DATASET_USER_LIKES.UID - override val idColumn: TableField[DatasetUserLikesRecord, UInteger] = DATASET_USER_LIKES.DID + override val idColumn: TableField[DatasetUserLikesRecord, Integer] = DATASET_USER_LIKES.DID } def apply(entityType: String): LikeTable = @@ -94,9 +86,9 @@ object EntityTables { case object WorkflowCloneTable extends CloneTable { override type R = WorkflowUserClonesRecord override val table: Table[WorkflowUserClonesRecord] = WORKFLOW_USER_CLONES - override val uidColumn: TableField[WorkflowUserClonesRecord, UInteger] = + override val uidColumn: TableField[WorkflowUserClonesRecord, Integer] = WORKFLOW_USER_CLONES.UID - override val idColumn: TableField[WorkflowUserClonesRecord, UInteger] = + override val idColumn: TableField[WorkflowUserClonesRecord, Integer] = WORKFLOW_USER_CLONES.WID } @@ -112,24 +104,24 @@ object EntityTables { sealed trait ViewCountTable { type R <: Record val table: Table[R] - val idColumn: TableField[R, UInteger] - val viewCountColumn: TableField[R, UInteger] + val idColumn: TableField[R, Integer] + val viewCountColumn: TableField[R, Integer] } object ViewCountTable { case object WorkflowViewCountTable extends ViewCountTable { override type R = WorkflowViewCountRecord override val table: Table[WorkflowViewCountRecord] = WORKFLOW_VIEW_COUNT - override val idColumn: TableField[WorkflowViewCountRecord, UInteger] = WORKFLOW_VIEW_COUNT.WID - override val viewCountColumn: TableField[WorkflowViewCountRecord, UInteger] = + override val idColumn: TableField[WorkflowViewCountRecord, Integer] = WORKFLOW_VIEW_COUNT.WID + override val viewCountColumn: TableField[WorkflowViewCountRecord, Integer] = WORKFLOW_VIEW_COUNT.VIEW_COUNT } case object DatasetViewCountTable extends ViewCountTable { override type R = DatasetViewCountRecord override val table: Table[DatasetViewCountRecord] = DATASET_VIEW_COUNT - override val idColumn: TableField[DatasetViewCountRecord, UInteger] = DATASET_VIEW_COUNT.DID - override val viewCountColumn: TableField[DatasetViewCountRecord, UInteger] = + override val idColumn: TableField[DatasetViewCountRecord, Integer] = DATASET_VIEW_COUNT.DID + override val viewCountColumn: TableField[DatasetViewCountRecord, Integer] = DATASET_VIEW_COUNT.VIEW_COUNT } diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/hub/HubResource.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/hub/HubResource.scala index d26374fe4e3..c6f3200de12 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/hub/HubResource.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/hub/HubResource.scala @@ -1,6 +1,5 @@ package edu.uci.ics.texera.web.resource.dashboard.hub -import edu.uci.ics.amber.core.storage.StorageConfig import edu.uci.ics.texera.dao.SqlServer import edu.uci.ics.texera.dao.jooq.generated.Tables._ import HubResource.{ @@ -19,7 +18,6 @@ import edu.uci.ics.texera.web.resource.dashboard.user.workflow.WorkflowResource. mapWorkflowEntries } import org.jooq.impl.DSL -import org.jooq.types.UInteger import java.util import java.util.regex.Pattern @@ -36,7 +34,7 @@ import edu.uci.ics.texera.web.resource.dashboard.user.dataset.DatasetResource.{ } object HubResource { - case class userRequest(entityId: UInteger, userId: UInteger, entityType: String) + case class userRequest(entityId: Integer, userId: Integer, entityType: String) /** * Defines the currently accepted resource types. @@ -47,7 +45,7 @@ object HubResource { } final private lazy val context = SqlServer - .getInstance(StorageConfig.jdbcUrl, StorageConfig.jdbcUsername, StorageConfig.jdbcPassword) + .getInstance() .createDSLContext() final private val ipv4Pattern: Pattern = Pattern.compile( @@ -76,7 +74,7 @@ object HubResource { * @param entityType The type of entity being checked (must be validated). * @return `true` if the user has liked the entity, otherwise `false`. */ - def isLikedHelper(userId: UInteger, workflowId: UInteger, entityType: String): Boolean = { + def isLikedHelper(userId: Integer, workflowId: Integer, entityType: String): Boolean = { validateEntityType(entityType) val entityTables = LikeTable(entityType) val (table, uidColumn, idColumn) = @@ -103,8 +101,8 @@ object HubResource { */ def recordUserActivity( request: HttpServletRequest, - userId: UInteger = UInteger.valueOf(0), - entityId: UInteger, + userId: Integer = Integer.valueOf(0), + entityId: Integer, entityType: String, action: String ): Unit = { @@ -180,8 +178,8 @@ object HubResource { */ def recordCloneActivity( request: HttpServletRequest, - userId: UInteger, - entityId: UInteger, + userId: Integer, + entityId: Integer, entityType: String ): Unit = { @@ -216,7 +214,7 @@ object HubResource { * @return The number of times the entity has been liked or cloned. */ def getUserLCCount( - entityId: UInteger, + entityId: Integer, entityType: String, actionType: String ): Int = { @@ -237,7 +235,7 @@ object HubResource { .fetchOne(0, classOf[Int]) } - def fetchDashboardWorkflowsByWids(wids: Seq[UInteger], uid: UInteger): List[DashboardWorkflow] = { + def fetchDashboardWorkflowsByWids(wids: Seq[Integer], uid: Integer): List[DashboardWorkflow] = { if (wids.isEmpty) { return List.empty[DashboardWorkflow] } @@ -250,7 +248,7 @@ object HubResource { mapWorkflowEntries(records, uid) } - def fetchDashboardDatasetsByDids(dids: Seq[UInteger], uid: UInteger): List[DashboardDataset] = { + def fetchDashboardDatasetsByDids(dids: Seq[Integer], uid: Integer): List[DashboardDataset] = { if (dids.isEmpty) { return List.empty[DashboardDataset] } @@ -269,7 +267,7 @@ object HubResource { @Path("/hub") class HubResource { final private lazy val context = SqlServer - .getInstance(StorageConfig.jdbcUrl, StorageConfig.jdbcUsername, StorageConfig.jdbcPassword) + .getInstance() .createDSLContext() @GET @@ -283,7 +281,7 @@ class HubResource { context .selectCount() .from(table) - .where(isPublicColumn.eq(1.toByte)) + .where(isPublicColumn.eq(true)) .fetchOne(0, classOf[Integer]) } @@ -291,8 +289,8 @@ class HubResource { @Path("/isLiked") @Produces(Array(MediaType.APPLICATION_JSON)) def isLiked( - @QueryParam("workflowId") workflowId: UInteger, - @QueryParam("userId") userId: UInteger, + @QueryParam("workflowId") workflowId: Integer, + @QueryParam("userId") userId: Integer, @QueryParam("entityType") entityType: String ): Boolean = { isLikedHelper(userId, workflowId, entityType) @@ -322,7 +320,7 @@ class HubResource { @Path("/likeCount") @Produces(Array(MediaType.APPLICATION_JSON)) def getLikeCount( - @QueryParam("entityId") entityId: UInteger, + @QueryParam("entityId") entityId: Integer, @QueryParam("entityType") entityType: String ): Int = { getUserLCCount(entityId, entityType, "like") @@ -332,7 +330,7 @@ class HubResource { @Path("/cloneCount") @Produces(Array(MediaType.APPLICATION_JSON)) def getCloneCount( - @QueryParam("entityId") entityId: UInteger, + @QueryParam("entityId") entityId: Integer, @QueryParam("entityType") entityType: String ): Int = { getUserLCCount(entityId, entityType, "clone") @@ -357,7 +355,7 @@ class HubResource { context .insertInto(table) .set(idColumn, entityID) - .set(viewCountColumn, UInteger.valueOf(1)) + .set(viewCountColumn, Integer.valueOf(1)) .onDuplicateKeyUpdate() .set(viewCountColumn, viewCountColumn.add(1)) .execute() @@ -375,7 +373,7 @@ class HubResource { @Path("/viewCount") @Produces(Array(MediaType.APPLICATION_JSON)) def getViewCount( - @QueryParam("entityId") entityId: UInteger, + @QueryParam("entityId") entityId: Integer, @QueryParam("entityType") entityType: String ): Int = { @@ -387,7 +385,7 @@ class HubResource { context .insertInto(table) .set(idColumn, entityId) - .set(viewCountColumn, UInteger.valueOf(0)) + .set(viewCountColumn, Integer.valueOf(0)) .onDuplicateKeyIgnore() .execute() @@ -423,15 +421,15 @@ class HubResource { .from(table) .join(baseTable.table) .on(idColumn.eq(baseIdColumn)) - .where(isPublicColumn.eq(1.toByte)) + .where(isPublicColumn.eq(true)) .groupBy(idColumn) .orderBy(DSL.count(idColumn).desc()) .limit(8) - .fetchInto(classOf[UInteger]) + .fetchInto(classOf[Integer]) .asScala .toSeq - val currentUid: UInteger = if (uid == null || uid == -1) null else UInteger.valueOf(uid) + val currentUid: Integer = if (uid == null || uid == -1) null else Integer.valueOf(uid) val clickableFileEntries = if (entityType == "workflow") { diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/dataset/DatasetAccessResource.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/dataset/DatasetAccessResource.scala index e208e31d654..099bc002727 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/dataset/DatasetAccessResource.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/dataset/DatasetAccessResource.scala @@ -1,11 +1,10 @@ package edu.uci.ics.texera.web.resource.dashboard.user.dataset -import edu.uci.ics.amber.core.storage.StorageConfig import edu.uci.ics.amber.engine.common.Utils.withTransaction import edu.uci.ics.texera.dao.SqlServer import edu.uci.ics.texera.web.model.common.AccessEntry import edu.uci.ics.texera.dao.jooq.generated.Tables.USER -import edu.uci.ics.texera.dao.jooq.generated.enums.DatasetUserAccessPrivilege +import edu.uci.ics.texera.dao.jooq.generated.enums.PrivilegeEnum import edu.uci.ics.texera.dao.jooq.generated.tables.DatasetUserAccess.DATASET_USER_ACCESS import edu.uci.ics.texera.dao.jooq.generated.tables.daos.{DatasetDao, DatasetUserAccessDao, UserDao} import edu.uci.ics.texera.dao.jooq.generated.tables.pojos.{DatasetUserAccess, User} @@ -14,7 +13,6 @@ import edu.uci.ics.texera.web.resource.dashboard.user.dataset.DatasetAccessResou getOwner } import org.jooq.DSLContext -import org.jooq.types.UInteger import java.util import javax.annotation.security.RolesAllowed @@ -23,39 +21,39 @@ import javax.ws.rs.core.{MediaType, Response} object DatasetAccessResource { private lazy val context: DSLContext = SqlServer - .getInstance(StorageConfig.jdbcUrl, StorageConfig.jdbcUsername, StorageConfig.jdbcPassword) + .getInstance() .createDSLContext() - def isDatasetPublic(ctx: DSLContext, did: UInteger): Boolean = { + def isDatasetPublic(ctx: DSLContext, did: Integer): Boolean = { val datasetDao = new DatasetDao(ctx.configuration()) Option(datasetDao.fetchOneByDid(did)) .flatMap(dataset => Option(dataset.getIsPublic)) - .contains(1.toByte) + .contains(true) } - def userHasReadAccess(ctx: DSLContext, did: UInteger, uid: UInteger): Boolean = { + def userHasReadAccess(ctx: DSLContext, did: Integer, uid: Integer): Boolean = { isDatasetPublic(ctx, did) || userHasWriteAccess(ctx, did, uid) || - getDatasetUserAccessPrivilege(ctx, did, uid) == DatasetUserAccessPrivilege.READ + getDatasetUserAccessPrivilege(ctx, did, uid) == PrivilegeEnum.READ } - def userOwnDataset(ctx: DSLContext, did: UInteger, uid: UInteger): Boolean = { + def userOwnDataset(ctx: DSLContext, did: Integer, uid: Integer): Boolean = { val datasetDao = new DatasetDao(ctx.configuration()) Option(datasetDao.fetchOneByDid(did)) .exists(_.getOwnerUid == uid) } - def userHasWriteAccess(ctx: DSLContext, did: UInteger, uid: UInteger): Boolean = { + def userHasWriteAccess(ctx: DSLContext, did: Integer, uid: Integer): Boolean = { userOwnDataset(ctx, did, uid) || - getDatasetUserAccessPrivilege(ctx, did, uid) == DatasetUserAccessPrivilege.WRITE + getDatasetUserAccessPrivilege(ctx, did, uid) == PrivilegeEnum.WRITE } def getDatasetUserAccessPrivilege( ctx: DSLContext, - did: UInteger, - uid: UInteger - ): DatasetUserAccessPrivilege = { + did: Integer, + uid: Integer + ): PrivilegeEnum = { Option( ctx .select(DATASET_USER_ACCESS.PRIVILEGE) @@ -65,11 +63,11 @@ object DatasetAccessResource { .eq(did) .and(DATASET_USER_ACCESS.UID.eq(uid)) ) - .fetchOneInto(classOf[DatasetUserAccessPrivilege]) - ).getOrElse(DatasetUserAccessPrivilege.NONE) + .fetchOneInto(classOf[PrivilegeEnum]) + ).getOrElse(PrivilegeEnum.NONE) } - def getOwner(ctx: DSLContext, did: UInteger): User = { + def getOwner(ctx: DSLContext, did: Integer): User = { val datasetDao = new DatasetDao(ctx.configuration()) val userDao = new UserDao(ctx.configuration()) @@ -93,7 +91,7 @@ class DatasetAccessResource { */ @GET @Path("/owner/{did}") - def getOwnerEmailOfDataset(@PathParam("did") did: UInteger): String = { + def getOwnerEmailOfDataset(@PathParam("did") did: Integer): String = { var email = "" withTransaction(context) { ctx => val owner = getOwner(ctx, did) @@ -113,7 +111,7 @@ class DatasetAccessResource { @GET @Path("/list/{did}") def getAccessList( - @PathParam("did") did: UInteger + @PathParam("did") did: Integer ): util.List[AccessEntry] = { withTransaction(context) { ctx => val datasetDao = new DatasetDao(ctx.configuration()) @@ -146,7 +144,7 @@ class DatasetAccessResource { @PUT @Path("/grant/{did}/{email}/{privilege}") def grantAccess( - @PathParam("did") did: UInteger, + @PathParam("did") did: Integer, @PathParam("email") email: String, @PathParam("privilege") privilege: String ): Response = { @@ -157,7 +155,7 @@ class DatasetAccessResource { new DatasetUserAccess( did, userDao.fetchOneByEmail(email).getUid, - DatasetUserAccessPrivilege.valueOf(privilege) + PrivilegeEnum.valueOf(privilege) ) ) Response.ok().build() @@ -174,7 +172,7 @@ class DatasetAccessResource { @DELETE @Path("/revoke/{did}/{email}") def revokeAccess( - @PathParam("did") did: UInteger, + @PathParam("did") did: Integer, @PathParam("email") email: String ): Response = { withTransaction(context) { ctx => diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/dataset/DatasetResource.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/dataset/DatasetResource.scala index ac9165ec546..27bbedc2247 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/dataset/DatasetResource.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/dataset/DatasetResource.scala @@ -1,6 +1,6 @@ package edu.uci.ics.texera.web.resource.dashboard.user.dataset -import edu.uci.ics.amber.core.storage.{DocumentFactory, FileResolver, StorageConfig} +import edu.uci.ics.amber.core.storage.{DocumentFactory, FileResolver} import edu.uci.ics.amber.core.storage.util.dataset.{ GitVersionControlLocalFileStorage, PhysicalFileNode @@ -9,7 +9,7 @@ import edu.uci.ics.amber.engine.common.Utils.withTransaction import edu.uci.ics.amber.util.PathUtils import edu.uci.ics.texera.dao.SqlServer import edu.uci.ics.texera.web.auth.SessionUser -import edu.uci.ics.texera.dao.jooq.generated.enums.DatasetUserAccessPrivilege +import edu.uci.ics.texera.dao.jooq.generated.enums.PrivilegeEnum import edu.uci.ics.texera.dao.jooq.generated.tables.Dataset.DATASET import edu.uci.ics.texera.dao.jooq.generated.tables.DatasetUserAccess.DATASET_USER_ACCESS import edu.uci.ics.texera.dao.jooq.generated.tables.DatasetVersion.DATASET_VERSION @@ -31,7 +31,7 @@ import edu.uci.ics.texera.web.resource.dashboard.user.dataset.`type`.DatasetFile import io.dropwizard.auth.Auth import org.apache.commons.lang3.StringUtils import org.glassfish.jersey.media.multipart.{FormDataMultiPart, FormDataParam} -import org.jooq.types.UInteger + import org.jooq.{DSLContext, EnumType, Record, Result, SelectJoinStep} import play.api.libs.json.Json @@ -53,16 +53,16 @@ import scala.util.control.NonFatal import scala.util.{Failure, Success, Try, Using} object DatasetResource { - private val DATASET_IS_PUBLIC: Byte = 1 - private val DATASET_IS_PRIVATE: Byte = 0 + private val DATASET_IS_PUBLIC: Boolean = true + private val DATASET_IS_PRIVATE: Boolean = false private val FILE_OPERATION_UPLOAD_PREFIX = "file:upload:" private val FILE_OPERATION_REMOVE_PREFIX = "file:remove" - private val datasetLocks: scala.collection.concurrent.Map[UInteger, ReentrantLock] = - new scala.collection.concurrent.TrieMap[UInteger, ReentrantLock]() + private val datasetLocks: scala.collection.concurrent.Map[Integer, ReentrantLock] = + new scala.collection.concurrent.TrieMap[Integer, ReentrantLock]() private val context = SqlServer - .getInstance(StorageConfig.jdbcUrl, StorageConfig.jdbcUsername, StorageConfig.jdbcPassword) + .getInstance() .createDSLContext() /** @@ -71,7 +71,7 @@ object DatasetResource { * @param versionHash the hash of the version. If None, fetch the latest version * @return */ - def calculateDatasetVersionSize(did: UInteger, versionHash: Option[String] = None): Long = { + def calculateDatasetVersionSize(did: Integer, versionHash: Option[String] = None): Long = { /** * Internal util to calculate the size from the physical nodes @@ -112,7 +112,7 @@ object DatasetResource { /** * Helper function to get the dataset from DB using did */ - private def getDatasetByID(ctx: DSLContext, did: UInteger): Dataset = { + private def getDatasetByID(ctx: DSLContext, did: Integer): Dataset = { val datasetDao = new DatasetDao(ctx.configuration()) val dataset = datasetDao.fetchOneByDid(did) if (dataset == null) { @@ -126,7 +126,7 @@ object DatasetResource { */ private def getDatasetVersionByID( ctx: DSLContext, - dvid: UInteger + dvid: Integer ): DatasetVersion = { val datasetVersionDao = new DatasetVersionDao(ctx.configuration()) val version = datasetVersionDao.fetchOneByDvid(dvid) @@ -141,7 +141,7 @@ object DatasetResource { */ private def getLatestDatasetVersion( ctx: DSLContext, - did: UInteger + did: Integer ): Option[DatasetVersion] = { ctx .selectFrom(DATASET_VERSION) @@ -159,7 +159,7 @@ object DatasetResource { ) private def parseUserUploadedFormToDatasetOperations( - did: UInteger, + did: Integer, multiPart: FormDataMultiPart ): DatasetOperation = { val datasetPath = PathUtils.getDatasetPath(did) // Obtain dataset base path @@ -208,7 +208,7 @@ object DatasetResource { * @return the created dataset version */ def createNewDatasetVersionByAddingFiles( - did: UInteger, + did: Integer, user: User, filesToAdd: Map[java.nio.file.Path, InputStream] ): Option[DashboardDatasetVersion] = { @@ -227,8 +227,8 @@ object DatasetResource { // concurrency control is performed here: the thread has to have the lock in order to create the new version private def applyDatasetOperationToCreateNewVersion( ctx: DSLContext, - did: UInteger, - uid: UInteger, + did: Integer, + uid: Integer, ownerEmail: String, userProvidedVersionName: String, datasetOperation: DatasetOperation @@ -237,7 +237,7 @@ object DatasetResource { // the format of dataset version name is: v{#n} - {user provided dataset version name}. e.g. v10 - new version def generateDatasetVersionName( ctx: DSLContext, - did: UInteger, + did: Integer, userProvidedVersionName: String ): String = { val numberOfExistingVersions = ctx @@ -332,11 +332,11 @@ object DatasetResource { fileNodes: List[DatasetFileNode] ) - case class DatasetIDs(dids: List[UInteger]) + case class DatasetIDs(dids: List[Integer]) - case class DatasetNameModification(did: UInteger, name: String) + case class DatasetNameModification(did: Integer, name: String) - case class DatasetDescriptionModification(did: UInteger, description: String) + case class DatasetDescriptionModification(did: Integer, description: String) case class DatasetVersionRootFileNodesResponse( fileNodes: List[DatasetFileNode], @@ -355,7 +355,7 @@ object DatasetResource { ) } - def mapDashboardDataset(records: Result[Record], uid: UInteger): List[DashboardDataset] = { + def mapDashboardDataset(records: Result[Record], uid: Integer): List[DashboardDataset] = { records.asScala.map { record => val dataset = record.into(DATASET).into(classOf[Dataset]) val datasetAccess = record.into(DATASET_USER_ACCESS).into(classOf[DatasetUserAccess]) @@ -385,8 +385,8 @@ class DatasetResource { */ private def getDashboardDataset( ctx: DSLContext, - did: UInteger, - uid: Option[UInteger], + did: Integer, + uid: Option[Integer], isPublic: Boolean = false ): DashboardDataset = { if ( @@ -398,7 +398,7 @@ class DatasetResource { val targetDataset = getDatasetByID(ctx, did) val userAccessPrivilege = - if (isPublic) DatasetUserAccessPrivilege.NONE + if (isPublic) PrivilegeEnum.NONE else getDatasetUserAccessPrivilege(ctx, did, uid.get) val isOwner = !isPublic && (targetDataset.getOwnerUid == uid.get) @@ -417,8 +417,8 @@ class DatasetResource { */ private def createNewDatasetVersionFromFormData( ctx: DSLContext, - did: UInteger, - uid: UInteger, + did: Integer, + uid: Integer, ownerEmail: String, userProvidedVersionName: String, multiPart: FormDataMultiPart @@ -461,7 +461,7 @@ class DatasetResource { val dataset: Dataset = new Dataset() dataset.setName(datasetName) dataset.setDescription(datasetDescription) - dataset.setIsPublic(isDatasetPublic.toByte) + dataset.setIsPublic(isDatasetPublic.toByte == 1) dataset.setOwnerUid(uid) val createdDataset = ctx @@ -476,7 +476,7 @@ class DatasetResource { val datasetUserAccess = new DatasetUserAccess() datasetUserAccess.setDid(createdDataset.getDid) datasetUserAccess.setUid(uid) - datasetUserAccess.setPrivilege(DatasetUserAccessPrivilege.WRITE) + datasetUserAccess.setPrivilege(PrivilegeEnum.WRITE) datasetOfUserDao.insert(datasetUserAccess) // initialize the dataset directory @@ -503,7 +503,7 @@ class DatasetResource { createdDataset.getCreationTime ), user.getEmail, - DatasetUserAccessPrivilege.WRITE, + PrivilegeEnum.WRITE, isOwner = true, versions = List(), size = calculateDatasetVersionSize(did) @@ -589,7 +589,7 @@ class DatasetResource { @RolesAllowed(Array("REGULAR", "ADMIN")) @Path("/{did}/update/publicity") def toggleDatasetPublicity( - @PathParam("did") did: UInteger, + @PathParam("did") did: Integer, @Auth sessionUser: SessionUser ): Response = { withTransaction(context) { ctx => @@ -617,7 +617,7 @@ class DatasetResource { @Path("/{did}/version/create") @Consumes(Array(MediaType.MULTIPART_FORM_DATA)) def createDatasetVersion( - @PathParam("did") did: UInteger, + @PathParam("did") did: Integer, @FormDataParam("versionName") versionName: String, @Auth user: SessionUser, multiPart: FormDataMultiPart @@ -679,7 +679,7 @@ class DatasetResource { DashboardDataset( isOwner = false, dataset = dataset, - accessPrivilege = DatasetUserAccessPrivilege.READ, + accessPrivilege = PrivilegeEnum.READ, versions = List(), ownerEmail = ownerEmail, size = calculateDatasetVersionSize(dataset.getDid) @@ -691,7 +691,7 @@ class DatasetResource { isOwner = false, dataset = publicDataset.dataset, ownerEmail = publicDataset.ownerEmail, - accessPrivilege = DatasetUserAccessPrivilege.READ, + accessPrivilege = PrivilegeEnum.READ, versions = List(), size = calculateDatasetVersionSize(publicDataset.dataset.getDid) ) @@ -707,7 +707,7 @@ class DatasetResource { @RolesAllowed(Array("REGULAR", "ADMIN")) @Path("/{did}/version/list") def getDatasetVersionList( - @PathParam("did") did: UInteger, + @PathParam("did") did: Integer, @Auth user: SessionUser ): List[DatasetVersion] = { val uid = user.getUid @@ -722,7 +722,7 @@ class DatasetResource { @GET @Path("/{did}/publicVersion/list") def getPublicDatasetVersionList( - @PathParam("did") did: UInteger + @PathParam("did") did: Integer ): List[DatasetVersion] = { withTransaction(context)(ctx => { if (!isDatasetPublic(ctx, did)) { @@ -736,7 +736,7 @@ class DatasetResource { @RolesAllowed(Array("REGULAR", "ADMIN")) @Path("/{did}/version/latest") def retrieveLatestDatasetVersion( - @PathParam("did") did: UInteger, + @PathParam("did") did: Integer, @Auth user: SessionUser ): DashboardDatasetVersion = { val uid = user.getUid @@ -784,8 +784,8 @@ class DatasetResource { @RolesAllowed(Array("REGULAR", "ADMIN")) @Path("/{did}/version/{dvid}/rootFileNodes") def retrieveDatasetVersionRootFileNodes( - @PathParam("did") did: UInteger, - @PathParam("dvid") dvid: UInteger, + @PathParam("did") did: Integer, + @PathParam("dvid") dvid: Integer, @Auth user: SessionUser ): DatasetVersionRootFileNodesResponse = { val uid = user.getUid @@ -797,8 +797,8 @@ class DatasetResource { @GET @Path("/{did}/publicVersion/{dvid}/rootFileNodes") def retrievePublicDatasetVersionRootFileNodes( - @PathParam("did") did: UInteger, - @PathParam("dvid") dvid: UInteger + @PathParam("did") did: Integer, + @PathParam("dvid") dvid: Integer ): DatasetVersionRootFileNodesResponse = { withTransaction(context)(ctx => fetchDatasetVersionRootFileNodes(ctx, did, dvid, None, isPublic = true) @@ -809,7 +809,7 @@ class DatasetResource { @RolesAllowed(Array("REGULAR", "ADMIN")) @Path("/{did}") def getDataset( - @PathParam("did") did: UInteger, + @PathParam("did") did: Integer, @Auth user: SessionUser ): DashboardDataset = { val uid = user.getUid @@ -819,7 +819,7 @@ class DatasetResource { @GET @Path("/public/{did}") def getPublicDataset( - @PathParam("did") did: UInteger + @PathParam("did") did: Integer ): DashboardDataset = { withTransaction(context)(ctx => fetchDataset(ctx, did, None, isPublic = true)) } @@ -882,7 +882,7 @@ class DatasetResource { @RolesAllowed(Array("REGULAR", "ADMIN")) @Path("/version-zip") def retrieveDatasetVersionZip( - @QueryParam("did") did: UInteger, + @QueryParam("did") did: Integer, @QueryParam("dvid") dvid: Optional[Integer], @Auth user: SessionUser ): Response = { @@ -895,7 +895,7 @@ class DatasetResource { throw new NotFoundException(ERR_DATASET_VERSION_NOT_FOUND_MESSAGE) ) } else { - getDatasetVersionByID(context, UInteger.valueOf(dvid.get)) + getDatasetVersionByID(context, Integer.valueOf(dvid.get)) } val targetDatasetPath = PathUtils.getDatasetPath(dataset.getDid) val fileNodes = GitVersionControlLocalFileStorage.retrieveRootFileNodesOfVersion( @@ -956,8 +956,8 @@ class DatasetResource { @GET @Path("/datasetUserAccess") def datasetUserAccess( - @QueryParam("did") did: UInteger - ): java.util.List[UInteger] = { + @QueryParam("did") did: Integer + ): java.util.List[Integer] = { val records = context .select(DATASET_USER_ACCESS.UID) .from(DATASET_USER_ACCESS) @@ -967,7 +967,7 @@ class DatasetResource { records.getValues(DATASET_USER_ACCESS.UID) } - private def fetchDatasetVersions(ctx: DSLContext, did: UInteger): List[DatasetVersion] = { + private def fetchDatasetVersions(ctx: DSLContext, did: Integer): List[DatasetVersion] = { ctx .selectFrom(DATASET_VERSION) .where(DATASET_VERSION.DID.eq(did)) @@ -979,9 +979,9 @@ class DatasetResource { private def fetchDatasetVersionRootFileNodes( ctx: DSLContext, - did: UInteger, - dvid: UInteger, - uid: Option[UInteger], + did: Integer, + dvid: Integer, + uid: Option[Integer], isPublic: Boolean ): DatasetVersionRootFileNodesResponse = { val dataset = getDashboardDataset(ctx, did, uid, isPublic) @@ -1017,8 +1017,8 @@ class DatasetResource { private def fetchDataset( ctx: DSLContext, - did: UInteger, - uid: Option[UInteger], + did: Integer, + uid: Option[Integer], isPublic: Boolean ): DashboardDataset = { val dashboardDataset = getDashboardDataset(ctx, did, uid, isPublic) diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/dataset/utils/DatasetStatisticsUtils.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/dataset/utils/DatasetStatisticsUtils.scala index 3f1c17a39d2..77a745c1423 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/dataset/utils/DatasetStatisticsUtils.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/dataset/utils/DatasetStatisticsUtils.scala @@ -1,21 +1,19 @@ package edu.uci.ics.texera.web.resource.dashboard.user.dataset.utils -import edu.uci.ics.amber.core.storage.StorageConfig import edu.uci.ics.texera.dao.SqlServer import edu.uci.ics.texera.dao.jooq.generated.tables.Dataset.DATASET import edu.uci.ics.texera.web.resource.dashboard.user.dataset.DatasetResource import edu.uci.ics.texera.web.resource.dashboard.user.quota.UserQuotaResource.DatasetQuota -import org.jooq.types.UInteger import scala.jdk.CollectionConverters._ object DatasetStatisticsUtils { final private lazy val context = SqlServer - .getInstance(StorageConfig.jdbcUrl, StorageConfig.jdbcUsername, StorageConfig.jdbcPassword) + .getInstance() .createDSLContext() // this function retrieves the total counts of dataset that belongs to the user - def getUserCreatedDatasetCount(uid: UInteger): Int = { + def getUserCreatedDatasetCount(uid: Integer): Int = { val count = context .selectCount() .from(DATASET) @@ -26,7 +24,7 @@ object DatasetStatisticsUtils { } // this function would return a list of dataset ids that belongs to the user - private def getUserCreatedDatasetList(uid: UInteger): List[DatasetQuota] = { + private def getUserCreatedDatasetList(uid: Integer): List[DatasetQuota] = { val result = context .select( DATASET.DID, @@ -42,14 +40,14 @@ object DatasetStatisticsUtils { DatasetQuota( did = record.getValue(DATASET.DID), name = record.getValue(DATASET.NAME), - creationTime = record.getValue(DATASET.CREATION_TIME).getTime(), + creationTime = record.getValue(DATASET.CREATION_TIME).getTime, size = 0 ) ) .toList } - def getUserCreatedDatasets(uid: UInteger): List[DatasetQuota] = { + def getUserCreatedDatasets(uid: Integer): List[DatasetQuota] = { val datasetList = getUserCreatedDatasetList(uid) datasetList.map { dataset => val size = DatasetResource.calculateDatasetVersionSize(dataset.did) diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/project/ProjectAccessResource.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/project/ProjectAccessResource.scala index 59e6b5b7d38..d124343074d 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/project/ProjectAccessResource.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/project/ProjectAccessResource.scala @@ -1,14 +1,12 @@ package edu.uci.ics.texera.web.resource.dashboard.user.project -import edu.uci.ics.amber.core.storage.StorageConfig import edu.uci.ics.texera.dao.SqlServer import edu.uci.ics.texera.web.model.common.AccessEntry import edu.uci.ics.texera.dao.jooq.generated.Tables.{PROJECT_USER_ACCESS, USER} -import edu.uci.ics.texera.dao.jooq.generated.enums.ProjectUserAccessPrivilege +import edu.uci.ics.texera.dao.jooq.generated.enums.PrivilegeEnum import edu.uci.ics.texera.dao.jooq.generated.tables.daos.{ProjectDao, ProjectUserAccessDao, UserDao} import edu.uci.ics.texera.dao.jooq.generated.tables.pojos.ProjectUserAccess import org.jooq.DSLContext -import org.jooq.types.UInteger import java.util import javax.annotation.security.RolesAllowed @@ -20,7 +18,7 @@ import javax.ws.rs.core.MediaType @Path("/access/project") class ProjectAccessResource() { final private val context: DSLContext = SqlServer - .getInstance(StorageConfig.jdbcUrl, StorageConfig.jdbcUsername, StorageConfig.jdbcPassword) + .getInstance() .createDSLContext() final private val userDao = new UserDao(context.configuration()) final private val projectDao = new ProjectDao(context.configuration) @@ -34,7 +32,7 @@ class ProjectAccessResource() { */ @GET @Path("/owner/{pid}") - def getOwner(@PathParam("pid") pid: UInteger): String = { + def getOwner(@PathParam("pid") pid: Integer): String = { userDao.fetchOneByUid(projectDao.fetchOneByPid(pid).getOwnerId).getEmail } @@ -47,7 +45,7 @@ class ProjectAccessResource() { @GET @Path("/list/{pid}") def getAccessList( - @PathParam("pid") pid: UInteger + @PathParam("pid") pid: Integer ): util.List[AccessEntry] = { context .select( @@ -77,7 +75,7 @@ class ProjectAccessResource() { @PUT @Path("/grant/{pid}/{email}/{privilege}") def grantAccess( - @PathParam("pid") pid: UInteger, + @PathParam("pid") pid: Integer, @PathParam("email") email: String, @PathParam("privilege") privilege: String ): Unit = { @@ -85,7 +83,7 @@ class ProjectAccessResource() { new ProjectUserAccess( userDao.fetchOneByEmail(email).getUid, pid, - ProjectUserAccessPrivilege.valueOf(privilege) + PrivilegeEnum.valueOf(privilege) ) ) } @@ -100,7 +98,7 @@ class ProjectAccessResource() { @DELETE @Path("/revoke/{pid}/{email}") def revokeAccess( - @PathParam("pid") pid: UInteger, + @PathParam("pid") pid: Integer, @PathParam("email") email: String ): Unit = { context diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/project/ProjectResource.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/project/ProjectResource.scala index 9963721cd57..83f4b5cb5ca 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/project/ProjectResource.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/project/ProjectResource.scala @@ -1,10 +1,9 @@ package edu.uci.ics.texera.web.resource.dashboard.user.project -import edu.uci.ics.amber.core.storage.StorageConfig import edu.uci.ics.texera.dao.SqlServer import edu.uci.ics.texera.web.auth.SessionUser import edu.uci.ics.texera.dao.jooq.generated.Tables._ -import edu.uci.ics.texera.dao.jooq.generated.enums.ProjectUserAccessPrivilege +import edu.uci.ics.texera.dao.jooq.generated.enums.PrivilegeEnum import edu.uci.ics.texera.dao.jooq.generated.tables.daos.{ ProjectDao, ProjectUserAccessDao, @@ -18,7 +17,6 @@ import edu.uci.ics.texera.web.resource.dashboard.user.workflow.WorkflowAccessRes import edu.uci.ics.texera.web.resource.dashboard.user.workflow.WorkflowResource.DashboardWorkflow import io.dropwizard.auth.Auth import org.apache.commons.lang3.StringUtils -import org.jooq.types.UInteger import java.sql.Timestamp import java.util @@ -36,7 +34,7 @@ import scala.jdk.CollectionConverters.IterableHasAsScala object ProjectResource { final private lazy val context = SqlServer - .getInstance(StorageConfig.jdbcUrl, StorageConfig.jdbcUsername, StorageConfig.jdbcPassword) + .getInstance() .createDSLContext() final private lazy val userProjectDao = new ProjectDao(context.configuration) final private lazy val workflowOfProjectDao = new WorkflowOfProjectDao(context.configuration) @@ -53,7 +51,7 @@ object ProjectResource { * @param fileName name of exported file * @return String containing status of adding exported file to project(s) */ - def addExportedFileToProject(uid: UInteger, wid: UInteger, fileName: String): String = { + def addExportedFileToProject(uid: Integer, wid: Integer, fileName: String): String = { // get map of PIDs and project names val pidMap = context .select(WORKFLOW_OF_PROJECT.PID, PROJECT.NAME) @@ -76,7 +74,7 @@ object ProjectResource { } } - private def workflowOfProjectExists(wid: UInteger, pid: UInteger): Boolean = { + private def workflowOfProjectExists(wid: Integer, pid: Integer): Boolean = { workflowOfProjectDao.existsById( context .newRecord(WORKFLOW_OF_PROJECT.WID, WORKFLOW_OF_PROJECT.PID) @@ -85,10 +83,10 @@ object ProjectResource { } case class DashboardProject( - pid: UInteger, + pid: Integer, name: String, description: String, - ownerID: UInteger, + ownerID: Integer, creationTime: Timestamp, color: String, accessLevel: String @@ -108,7 +106,7 @@ class ProjectResource { */ @GET @Path("/{pid}") - def getProject(@PathParam("pid") pid: UInteger): Project = { + def getProject(@PathParam("pid") pid: Integer): Project = { userProjectDao.fetchOneByPid(pid) } @@ -135,7 +133,6 @@ class ProjectResource { .join(PROJECT) .on(PROJECT_USER_ACCESS.PID.eq(PROJECT.PID)) .where(PROJECT.OWNER_ID.eq(user.getUid).or(PROJECT_USER_ACCESS.UID.eq(user.getUid))) - .groupBy(PROJECT.PID) .fetchInto(classOf[DashboardProject]) } @@ -150,7 +147,7 @@ class ProjectResource { @GET @Path("/{pid}/workflows") def listProjectWorkflows( - @PathParam("pid") pid: UInteger, + @PathParam("pid") pid: Integer, @Auth user: SessionUser ): List[DashboardWorkflow] = { val result = DashboardResource.searchAllResources( @@ -177,7 +174,7 @@ class ProjectResource { try { userProjectDao.insert(project) projectUserAccessDao.merge( - new ProjectUserAccess(user.getUid, project.getPid, ProjectUserAccessPrivilege.WRITE) + new ProjectUserAccess(user.getUid, project.getPid, PrivilegeEnum.WRITE) ) } catch { case _: Throwable => @@ -195,8 +192,8 @@ class ProjectResource { @POST @Path("/{pid}/workflow/{wid}/add") def addWorkflowToProject( - @PathParam("pid") pid: UInteger, - @PathParam("wid") wid: UInteger, + @PathParam("pid") pid: Integer, + @PathParam("wid") wid: Integer, @Auth user: SessionUser ): Unit = { if (!hasReadAccess(wid, user.getUid)) { @@ -217,7 +214,7 @@ class ProjectResource { @POST @Path("/{pid}/rename/{name}") def updateProjectName( - @PathParam("pid") pid: UInteger, + @PathParam("pid") pid: Integer, @PathParam("name") name: String ): Unit = { val userProject: Project = userProjectDao.fetchOneByPid(pid) @@ -242,7 +239,7 @@ class ProjectResource { @Path("/{pid}/update/description") @Consumes(Array(MediaType.TEXT_PLAIN)) def updateProjectDescription( - @PathParam("pid") pid: UInteger, + @PathParam("pid") pid: Integer, description: String ): Unit = { val userProject: Project = userProjectDao.fetchOneByPid(pid) @@ -264,7 +261,7 @@ class ProjectResource { @POST @Path("/{pid}/color/{colorHex}/add") def updateProjectColor( - @PathParam("pid") pid: UInteger, + @PathParam("pid") pid: Integer, @PathParam("colorHex") colorHex: String, @Auth sessionUser: SessionUser ): Unit = { @@ -283,7 +280,7 @@ class ProjectResource { @POST @Path("/{pid}/color/delete") - def deleteProjectColor(@PathParam("pid") pid: UInteger): Unit = { + def deleteProjectColor(@PathParam("pid") pid: Integer): Unit = { val userProject: Project = userProjectDao.fetchOneByPid(pid) userProject.setColor(null) userProjectDao.update(userProject) @@ -296,7 +293,7 @@ class ProjectResource { */ @DELETE @Path("/delete/{pid}") - def deleteProject(@PathParam("pid") pid: UInteger): Unit = { + def deleteProject(@PathParam("pid") pid: Integer): Unit = { userProjectDao.deleteById(pid) } @@ -310,8 +307,8 @@ class ProjectResource { @DELETE @Path("/{pid}/workflow/{wid}/delete") def deleteWorkflowFromProject( - @PathParam("pid") pid: UInteger, - @PathParam("wid") wid: UInteger + @PathParam("pid") pid: Integer, + @PathParam("wid") wid: Integer ): Unit = { workflowOfProjectDao.deleteById( context.newRecord(WORKFLOW_OF_PROJECT.WID, WORKFLOW_OF_PROJECT.PID).values(wid, pid) diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/project/PublicProjectResource.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/project/PublicProjectResource.scala index 9e20262d7e4..9ee9773c5bd 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/project/PublicProjectResource.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/project/PublicProjectResource.scala @@ -1,15 +1,13 @@ package edu.uci.ics.texera.web.resource.dashboard.user.project -import edu.uci.ics.amber.core.storage.StorageConfig import edu.uci.ics.texera.dao.SqlServer import edu.uci.ics.texera.web.auth.SessionUser import edu.uci.ics.texera.dao.jooq.generated.Tables.{PROJECT, PUBLIC_PROJECT, USER} -import edu.uci.ics.texera.dao.jooq.generated.enums.ProjectUserAccessPrivilege +import edu.uci.ics.texera.dao.jooq.generated.enums.PrivilegeEnum import edu.uci.ics.texera.dao.jooq.generated.tables.daos.{ProjectUserAccessDao, PublicProjectDao} import edu.uci.ics.texera.dao.jooq.generated.tables.pojos.{ProjectUserAccess, PublicProject} import io.dropwizard.auth.Auth import org.jooq.DSLContext -import org.jooq.types.UInteger import java.sql.Timestamp import java.util @@ -17,7 +15,7 @@ import javax.annotation.security.RolesAllowed import javax.ws.rs._ case class DashboardPublicProject( - pid: UInteger, + pid: Integer, name: String, owner: String, creationTime: Timestamp @@ -27,7 +25,7 @@ case class DashboardPublicProject( class PublicProjectResource { final private val context: DSLContext = SqlServer - .getInstance(StorageConfig.jdbcUrl, StorageConfig.jdbcUsername, StorageConfig.jdbcPassword) + .getInstance() .createDSLContext() final private lazy val publicProjectDao = new PublicProjectDao(context.configuration) final private val projectUserAccessDao = new ProjectUserAccessDao(context.configuration) @@ -35,7 +33,7 @@ class PublicProjectResource { @GET @RolesAllowed(Array("ADMIN")) @Path("/type/{pid}") - def getType(@PathParam("pid") pid: UInteger): String = { + def getType(@PathParam("pid") pid: Integer): String = { if (publicProjectDao.fetchOneByPid(pid) == null) "Private" else @@ -45,27 +43,27 @@ class PublicProjectResource { @PUT @RolesAllowed(Array("ADMIN")) @Path("/public/{pid}") - def makePublic(@PathParam("pid") pid: UInteger, @Auth user: SessionUser): Unit = { + def makePublic(@PathParam("pid") pid: Integer, @Auth user: SessionUser): Unit = { publicProjectDao.insert(new PublicProject(pid, user.getUid)) } @PUT @RolesAllowed(Array("ADMIN")) @Path("/private/{pid}") - def makePrivate(@PathParam("pid") pid: UInteger): Unit = { + def makePrivate(@PathParam("pid") pid: Integer): Unit = { publicProjectDao.deleteById(pid) } @PUT @RolesAllowed(Array("REGULAR", "ADMIN")) @Path("/add") - def addPublicProjects(checkedList: util.List[UInteger], @Auth user: SessionUser): Unit = { + def addPublicProjects(checkedList: util.List[Integer], @Auth user: SessionUser): Unit = { checkedList.forEach(pid => { projectUserAccessDao.merge( new ProjectUserAccess( user.getUid, pid, - ProjectUserAccessPrivilege.READ + PrivilegeEnum.READ ) ) }) diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/quota/UserQuotaResource.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/quota/UserQuotaResource.scala index 4a9f78f44ef..6c801bb51e6 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/quota/UserQuotaResource.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/quota/UserQuotaResource.scala @@ -1,6 +1,5 @@ package edu.uci.ics.texera.web.resource.dashboard.user.quota -import edu.uci.ics.amber.core.storage.StorageConfig import edu.uci.ics.amber.core.storage.util.mongo.MongoDatabaseManager import edu.uci.ics.amber.core.storage.util.mongo.MongoDatabaseManager.database import edu.uci.ics.texera.dao.SqlServer @@ -10,7 +9,6 @@ import edu.uci.ics.texera.web.resource.dashboard.user.dataset.utils.DatasetStati import edu.uci.ics.texera.web.resource.dashboard.user.quota.UserQuotaResource._ import io.dropwizard.auth.Auth import org.bson.Document -import org.jooq.types.UInteger import java.util import javax.ws.rs._ @@ -19,19 +17,19 @@ import scala.jdk.CollectionConverters.IterableHasAsScala object UserQuotaResource { final private lazy val context = SqlServer - .getInstance(StorageConfig.jdbcUrl, StorageConfig.jdbcUsername, StorageConfig.jdbcPassword) + .getInstance() .createDSLContext() case class Workflow( - userId: UInteger, - workflowId: UInteger, + userId: Integer, + workflowId: Integer, workflowName: String, creationTime: Long, lastModifiedTime: Long ) case class DatasetQuota( - did: UInteger, + did: Integer, name: String, creationTime: Long, size: Long @@ -41,7 +39,7 @@ object UserQuotaResource { workflowName: String, size: Double, pointer: String, - eid: UInteger + eid: Integer ) def getDatabaseSize(collectionNames: Array[MongoStorage]): Array[MongoStorage] = { @@ -83,7 +81,7 @@ object UserQuotaResource { name } - def getUserCreatedWorkflow(uid: UInteger): List[Workflow] = { + def getUserCreatedWorkflow(uid: Integer): List[Workflow] = { val userWorkflowEntries = context .select( WORKFLOW_OF_USER.UID, @@ -120,7 +118,7 @@ object UserQuotaResource { .toList } - def getUserAccessedWorkflow(uid: UInteger): util.List[UInteger] = { + def getUserAccessedWorkflow(uid: Integer): util.List[Integer] = { val availableWorkflowIds = context .select( WORKFLOW_USER_ACCESS.WID @@ -131,12 +129,12 @@ object UserQuotaResource { .where( WORKFLOW_USER_ACCESS.UID.eq(uid) ) - .fetchInto(classOf[UInteger]) + .fetchInto(classOf[Integer]) availableWorkflowIds } - def getUserMongoDBSize(uid: UInteger): Array[MongoStorage] = { + def getUserMongoDBSize(uid: Integer): Array[MongoStorage] = { val collectionNames = context .select( WORKFLOW_EXECUTIONS.RESULT, @@ -210,7 +208,7 @@ class UserQuotaResource { @GET @Path("/access_workflows") @Produces(Array(MediaType.APPLICATION_JSON)) - def getAccessedWorkflow(@Auth current_user: SessionUser): util.List[UInteger] = { + def getAccessedWorkflow(@Auth current_user: SessionUser): util.List[Integer] = { getUserAccessedWorkflow(current_user.getUid) } diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/workflow/WorkflowAccessResource.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/workflow/WorkflowAccessResource.scala index 53e9bc76bd2..f668297e965 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/workflow/WorkflowAccessResource.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/workflow/WorkflowAccessResource.scala @@ -1,11 +1,10 @@ package edu.uci.ics.texera.web.resource.dashboard.user.workflow -import edu.uci.ics.amber.core.storage.StorageConfig import edu.uci.ics.texera.dao.SqlServer import edu.uci.ics.texera.web.auth.SessionUser import edu.uci.ics.texera.web.model.common.AccessEntry import edu.uci.ics.texera.dao.jooq.generated.Tables._ -import edu.uci.ics.texera.dao.jooq.generated.enums.WorkflowUserAccessPrivilege +import edu.uci.ics.texera.dao.jooq.generated.enums.PrivilegeEnum import edu.uci.ics.texera.dao.jooq.generated.tables.daos.{ UserDao, WorkflowOfUserDao, @@ -15,7 +14,6 @@ import edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowUserAccess import edu.uci.ics.texera.web.resource.dashboard.user.workflow.WorkflowAccessResource.context import io.dropwizard.auth.Auth import org.jooq.DSLContext -import org.jooq.types.UInteger import java.util import javax.annotation.security.RolesAllowed @@ -24,7 +22,7 @@ import javax.ws.rs.core.MediaType object WorkflowAccessResource { final private val context: DSLContext = SqlServer - .getInstance(StorageConfig.jdbcUrl, StorageConfig.jdbcUsername, StorageConfig.jdbcPassword) + .getInstance() .createDSLContext() /** @@ -34,8 +32,8 @@ object WorkflowAccessResource { * @param uid user id, works with workflow id as primary keys in database * @return boolean value indicating yes/no */ - def hasReadAccess(wid: UInteger, uid: UInteger): Boolean = { - isPublic(wid) || getPrivilege(wid, uid).eq(WorkflowUserAccessPrivilege.READ) || hasWriteAccess( + def hasReadAccess(wid: Integer, uid: Integer): Boolean = { + isPublic(wid) || getPrivilege(wid, uid).eq(PrivilegeEnum.READ) || hasWriteAccess( wid, uid ) @@ -48,16 +46,16 @@ object WorkflowAccessResource { * @param uid user id, works with workflow id as primary keys in database * @return boolean value indicating yes/no */ - def hasWriteAccess(wid: UInteger, uid: UInteger): Boolean = { - getPrivilege(wid, uid).eq(WorkflowUserAccessPrivilege.WRITE) + def hasWriteAccess(wid: Integer, uid: Integer): Boolean = { + getPrivilege(wid, uid).eq(PrivilegeEnum.WRITE) } /** * @param wid workflow id * @param uid user id, works with workflow id as primary keys in database - * @return WorkflowUserAccessPrivilege value indicating NONE/READ/WRITE + * @return PrivilegeEnum value indicating NONE/READ/WRITE */ - def getPrivilege(wid: UInteger, uid: UInteger): WorkflowUserAccessPrivilege = { + def getPrivilege(wid: Integer, uid: Integer): PrivilegeEnum = { val access = context .select() .from(WORKFLOW_USER_ACCESS) @@ -72,7 +70,7 @@ object WorkflowAccessResource { .where(WORKFLOW_OF_PROJECT.WID.eq(wid).and(PROJECT_USER_ACCESS.UID.eq(uid))) .fetchOneInto(classOf[WorkflowUserAccess]) if (projectAccess == null) { - WorkflowUserAccessPrivilege.NONE + PrivilegeEnum.NONE } else { projectAccess.getPrivilege } @@ -81,7 +79,7 @@ object WorkflowAccessResource { } } - def isPublic(wid: UInteger): Boolean = { + def isPublic(wid: Integer): Boolean = { context .select(WORKFLOW.IS_PUBLIC) .from(WORKFLOW) @@ -106,7 +104,7 @@ class WorkflowAccessResource() { */ @GET @Path("/owner/{wid}") - def getOwner(@PathParam("wid") wid: UInteger): String = { + def getOwner(@PathParam("wid") wid: Integer): String = { userDao.fetchOneByUid(workflowOfUserDao.fetchByWid(wid).get(0).getUid).getEmail } @@ -119,7 +117,7 @@ class WorkflowAccessResource() { @GET @Path("/list/{wid}") def getAccessList( - @PathParam("wid") wid: UInteger + @PathParam("wid") wid: Integer ): util.List[AccessEntry] = { context .select( @@ -149,7 +147,7 @@ class WorkflowAccessResource() { @PUT @Path("/grant/{wid}/{email}/{privilege}") def grantAccess( - @PathParam("wid") wid: UInteger, + @PathParam("wid") wid: Integer, @PathParam("email") email: String, @PathParam("privilege") privilege: String, @Auth user: SessionUser @@ -162,7 +160,7 @@ class WorkflowAccessResource() { new WorkflowUserAccess( userDao.fetchOneByEmail(email).getUid, wid, - WorkflowUserAccessPrivilege.valueOf(privilege) + PrivilegeEnum.valueOf(privilege) ) ) } catch { @@ -182,7 +180,7 @@ class WorkflowAccessResource() { @DELETE @Path("/revoke/{wid}/{email}") def revokeAccess( - @PathParam("wid") wid: UInteger, + @PathParam("wid") wid: Integer, @PathParam("email") email: String ): Unit = { context diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/workflow/WorkflowExecutionsResource.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/workflow/WorkflowExecutionsResource.scala index 8240a34b339..52961a34524 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/workflow/WorkflowExecutionsResource.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/workflow/WorkflowExecutionsResource.scala @@ -1,10 +1,8 @@ package edu.uci.ics.texera.web.resource.dashboard.user.workflow import edu.uci.ics.amber.core.storage.result.ExecutionResourcesMapping -import edu.uci.ics.amber.core.storage.{DocumentFactory, StorageConfig, VFSURIFactory} +import edu.uci.ics.amber.core.storage.{DocumentFactory, VFSURIFactory} import edu.uci.ics.amber.core.tuple.Tuple -import edu.uci.ics.amber.engine.architecture.logreplay.{ReplayDestination, ReplayLogRecord} -import edu.uci.ics.amber.engine.common.storage.SequentialRecordStorage import edu.uci.ics.amber.core.virtualidentity.{ ChannelMarkerIdentity, ExecutionIdentity, @@ -12,22 +10,17 @@ import edu.uci.ics.amber.core.virtualidentity.{ WorkflowIdentity } import edu.uci.ics.amber.core.workflow.PortIdentity +import edu.uci.ics.amber.engine.architecture.logreplay.{ReplayDestination, ReplayLogRecord} import edu.uci.ics.amber.engine.common.AmberConfig +import edu.uci.ics.amber.engine.common.storage.SequentialRecordStorage import edu.uci.ics.texera.dao.SqlServer -import edu.uci.ics.texera.web.auth.SessionUser -import edu.uci.ics.texera.dao.jooq.generated.Tables.{ - OPERATOR_EXECUTIONS, - OPERATOR_PORT_EXECUTIONS, - USER, - WORKFLOW_EXECUTIONS, - WORKFLOW_VERSION -} +import edu.uci.ics.texera.dao.jooq.generated.Tables._ import edu.uci.ics.texera.dao.jooq.generated.tables.daos.WorkflowExecutionsDao import edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowExecutions +import edu.uci.ics.texera.web.auth.SessionUser import edu.uci.ics.texera.web.resource.dashboard.user.workflow.WorkflowExecutionsResource._ import edu.uci.ics.texera.web.service.ExecutionsMetadataPersistService import io.dropwizard.auth.Auth -import org.jooq.types.{UInteger, ULong} import java.net.URI import java.sql.Timestamp @@ -36,15 +29,15 @@ import javax.annotation.security.RolesAllowed import javax.ws.rs._ import javax.ws.rs.core.{MediaType, Response} import scala.collection.mutable -import scala.jdk.CollectionConverters.ListHasAsScala +import scala.jdk.CollectionConverters._ object WorkflowExecutionsResource { final private lazy val context = SqlServer - .getInstance(StorageConfig.jdbcUrl, StorageConfig.jdbcUsername, StorageConfig.jdbcPassword) + .getInstance() .createDSLContext() final private lazy val executionsDao = new WorkflowExecutionsDao(context.configuration) - def getExecutionById(eId: UInteger): WorkflowExecutions = { + def getExecutionById(eId: Integer): WorkflowExecutions = { executionsDao.fetchOneByEid(eId) } @@ -71,16 +64,16 @@ object WorkflowExecutionsResource { * This function retrieves the latest execution id of a workflow * * @param wid workflow id - * @return UInteger + * @return Integer */ - def getLatestExecutionID(wid: UInteger): Option[UInteger] = { + def getLatestExecutionID(wid: Integer): Option[Integer] = { val executions = context .select(WORKFLOW_EXECUTIONS.EID) .from(WORKFLOW_EXECUTIONS) .join(WORKFLOW_VERSION) .on(WORKFLOW_EXECUTIONS.VID.eq(WORKFLOW_VERSION.VID)) .where(WORKFLOW_VERSION.WID.eq(wid)) - .fetchInto(classOf[UInteger]) + .fetchInto(classOf[Integer]) .asScala .toList if (executions.isEmpty) { @@ -123,13 +116,13 @@ object WorkflowExecutionsResource { .set(WORKFLOW_EXECUTIONS.RUNTIME_STATS_URI, uri.toString) .where( WORKFLOW_EXECUTIONS.EID - .eq(UInteger.valueOf(eid)) + .eq(eid.toInt) .and( WORKFLOW_EXECUTIONS.VID.in( context .select(WORKFLOW_VERSION.VID) .from(WORKFLOW_VERSION) - .where(WORKFLOW_VERSION.WID.eq(UInteger.valueOf(wid))) + .where(WORKFLOW_VERSION.WID.eq(wid.toInt)) ) ) ) @@ -141,7 +134,7 @@ object WorkflowExecutionsResource { context .select(OPERATOR_PORT_EXECUTIONS.RESULT_URI) .from(OPERATOR_PORT_EXECUTIONS) - .where(OPERATOR_PORT_EXECUTIONS.WORKFLOW_EXECUTION_ID.eq(UInteger.valueOf(eid.id))) + .where(OPERATOR_PORT_EXECUTIONS.WORKFLOW_EXECUTION_ID.eq(eid.id.toInt)) .fetchInto(classOf[String]) .asScala .toList @@ -155,7 +148,7 @@ object WorkflowExecutionsResource { if (AmberConfig.isUserSystemEnabled) { context .delete(OPERATOR_PORT_EXECUTIONS) - .where(OPERATOR_PORT_EXECUTIONS.WORKFLOW_EXECUTION_ID.eq(UInteger.valueOf(eid.id))) + .where(OPERATOR_PORT_EXECUTIONS.WORKFLOW_EXECUTION_ID.eq(eid.id.toInt)) .execute() } else { ExecutionResourcesMapping.removeExecutionResources(eid) @@ -175,7 +168,7 @@ object WorkflowExecutionsResource { .from(OPERATOR_PORT_EXECUTIONS) .where( OPERATOR_PORT_EXECUTIONS.WORKFLOW_EXECUTION_ID - .eq(UInteger.valueOf(eid.id)) + .eq(eid.id.toInt) .and(OPERATOR_PORT_EXECUTIONS.OPERATOR_ID.eq(opId.id)) .and(OPERATOR_PORT_EXECUTIONS.PORT_ID.eq(portId.id)) ) @@ -194,8 +187,8 @@ object WorkflowExecutionsResource { } case class WorkflowExecutionEntry( - eId: UInteger, - vId: UInteger, + eId: Integer, + vId: Integer, userName: String, googleAvatar: String, status: Byte, @@ -210,27 +203,27 @@ object WorkflowExecutionsResource { case class WorkflowRuntimeStatistics( operatorId: String, timestamp: Timestamp, - inputTupleCount: ULong, - inputTupleSize: ULong, - outputTupleCount: ULong, - outputTupleSize: ULong, - dataProcessingTime: ULong, - controlProcessingTime: ULong, - idleTime: ULong, - numWorkers: UInteger, + inputTupleCount: Long, + inputTupleSize: Long, + outputTupleCount: Long, + outputTupleSize: Long, + dataProcessingTime: Long, + controlProcessingTime: Long, + idleTime: Long, + numWorkers: Int, status: Int ) } case class ExecutionGroupBookmarkRequest( - wid: UInteger, - eIds: Array[UInteger], + wid: Integer, + eIds: Array[Integer], isBookmarked: Boolean ) -case class ExecutionGroupDeleteRequest(wid: UInteger, eIds: Array[UInteger]) +case class ExecutionGroupDeleteRequest(wid: Integer, eIds: Array[Integer]) -case class ExecutionRenameRequest(wid: UInteger, eId: UInteger, executionName: String) +case class ExecutionRenameRequest(wid: Integer, eId: Integer, executionName: String) @Produces(Array(MediaType.APPLICATION_JSON)) @Path("/executions") @@ -241,8 +234,8 @@ class WorkflowExecutionsResource { @Path("/{wid}/interactions/{eid}") @RolesAllowed(Array("REGULAR", "ADMIN")) def retrieveInteractionHistory( - @PathParam("wid") wid: UInteger, - @PathParam("eid") eid: UInteger, + @PathParam("wid") wid: Integer, + @PathParam("eid") eid: Integer, @Auth sessionUser: SessionUser ): List[String] = { val user = sessionUser.getUser @@ -282,7 +275,7 @@ class WorkflowExecutionsResource { @Path("/{wid}") @RolesAllowed(Array("REGULAR", "ADMIN")) def retrieveExecutionsOfWorkflow( - @PathParam("wid") wid: UInteger, + @PathParam("wid") wid: Integer, @Auth sessionUser: SessionUser ): List[WorkflowExecutionEntry] = { val user = sessionUser.getUser @@ -320,8 +313,8 @@ class WorkflowExecutionsResource { @Produces(Array(MediaType.APPLICATION_JSON)) @Path("/{wid}/{eid}") def retrieveWorkflowRuntimeStatistics( - @PathParam("wid") wid: UInteger, - @PathParam("eid") eid: UInteger + @PathParam("wid") wid: Integer, + @PathParam("eid") eid: Integer ): List[WorkflowRuntimeStatistics] = { // Create URI for runtime statistics val uriString: String = context @@ -358,14 +351,14 @@ class WorkflowExecutionsResource { WorkflowRuntimeStatistics( operatorId = record.getField(0).asInstanceOf[String], timestamp = record.getField(1).asInstanceOf[Timestamp], - inputTupleCount = ULong.valueOf(record.getField(2).asInstanceOf[Long]), - inputTupleSize = ULong.valueOf(record.getField(3).asInstanceOf[Long]), - outputTupleCount = ULong.valueOf(record.getField(4).asInstanceOf[Long]), - outputTupleSize = ULong.valueOf(record.getField(5).asInstanceOf[Long]), - dataProcessingTime = ULong.valueOf(record.getField(6).asInstanceOf[Long]), - controlProcessingTime = ULong.valueOf(record.getField(7).asInstanceOf[Long]), - idleTime = ULong.valueOf(record.getField(8).asInstanceOf[Long]), - numWorkers = UInteger.valueOf(record.getField(9).asInstanceOf[Int]), + inputTupleCount = record.getField(2).asInstanceOf[Long], + inputTupleSize = record.getField(3).asInstanceOf[Long], + outputTupleCount = record.getField(4).asInstanceOf[Long], + outputTupleSize = record.getField(5).asInstanceOf[Long], + dataProcessingTime = record.getField(6).asInstanceOf[Long], + controlProcessingTime = record.getField(7).asInstanceOf[Long], + idleTime = record.getField(8).asInstanceOf[Long], + numWorkers = record.getField(9).asInstanceOf[Int], status = record.getField(10).asInstanceOf[Int] ) }) @@ -382,27 +375,27 @@ class WorkflowExecutionsResource { @Auth sessionUser: SessionUser ): Unit = { validateUserCanAccessWorkflow(sessionUser.getUser.getUid, request.wid) + val eIdsList = request.eIds.toSeq.asJava if (request.isBookmarked) { - val eIdArray = request.eIds.mkString("(", ",", ")") - val sqlString = "update texera_db.workflow_executions " + - "set texera_db.workflow_executions.bookmarked = 0 " + - s"where texera_db.workflow_executions.eid in $eIdArray" + // If currently bookmarked, un-bookmark (set bookmarked = false) context - .query(sqlString) + .update(WORKFLOW_EXECUTIONS) + .set(WORKFLOW_EXECUTIONS.BOOKMARKED, java.lang.Boolean.valueOf(false)) + .where(WORKFLOW_EXECUTIONS.EID.in(eIdsList)) .execute() } else { - val eIdArray = request.eIds.mkString("(", ",", ")") - val sqlString = "UPDATE texera_db.workflow_executions " + - "SET texera_db.workflow_executions.bookmarked = 1 " + - s"WHERE texera_db.workflow_executions.eid IN $eIdArray" + // If currently not bookmarked, bookmark (set bookmarked = true) context - .query(sqlString) + .update(WORKFLOW_EXECUTIONS) + .set(WORKFLOW_EXECUTIONS.BOOKMARKED, java.lang.Boolean.valueOf(true)) + .where(WORKFLOW_EXECUTIONS.EID.in(eIdsList)) .execute() } + } /** Determine if user is authorized to access the workflow, if not raise 401 */ - def validateUserCanAccessWorkflow(uid: UInteger, wid: UInteger): Unit = { + def validateUserCanAccessWorkflow(uid: Integer, wid: Integer): Unit = { if (!WorkflowAccessResource.hasReadAccess(wid, uid)) throw new WebApplicationException(Response.Status.UNAUTHORIZED) } @@ -417,12 +410,11 @@ class WorkflowExecutionsResource { @Auth sessionUser: SessionUser ): Unit = { validateUserCanAccessWorkflow(sessionUser.getUser.getUid, request.wid) - /* delete the execution in sql */ - val eIdArray = request.eIds.mkString("(", ",", ")") - val sqlString: String = "DELETE FROM texera_db.workflow_executions " + - s"WHERE texera_db.workflow_executions.eid IN $eIdArray" + val eIdsList = request.eIds.toSeq.asJava + context - .query(sqlString) + .deleteFrom(WORKFLOW_EXECUTIONS) + .where(WORKFLOW_EXECUTIONS.EID.in(eIdsList)) .execute() } diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/workflow/WorkflowResource.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/workflow/WorkflowResource.scala index d5c714ff3a8..ddb46d998ae 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/workflow/WorkflowResource.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/workflow/WorkflowResource.scala @@ -3,11 +3,9 @@ package edu.uci.ics.texera.web.resource.dashboard.user.workflow import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.module.scala.DefaultScalaModule import com.typesafe.scalalogging.LazyLogging -import edu.uci.ics.amber.core.storage.StorageConfig import edu.uci.ics.texera.dao.SqlServer -import edu.uci.ics.texera.web.auth.SessionUser import edu.uci.ics.texera.dao.jooq.generated.Tables._ -import edu.uci.ics.texera.dao.jooq.generated.enums.WorkflowUserAccessPrivilege +import edu.uci.ics.texera.dao.jooq.generated.enums.PrivilegeEnum import edu.uci.ics.texera.dao.jooq.generated.tables.daos.{ WorkflowDao, WorkflowOfProjectDao, @@ -15,14 +13,13 @@ import edu.uci.ics.texera.dao.jooq.generated.tables.daos.{ WorkflowUserAccessDao } import edu.uci.ics.texera.dao.jooq.generated.tables.pojos._ +import edu.uci.ics.texera.web.auth.SessionUser import edu.uci.ics.texera.web.resource.dashboard.hub.HubResource.recordCloneActivity import edu.uci.ics.texera.web.resource.dashboard.user.workflow.WorkflowAccessResource.hasReadAccess import edu.uci.ics.texera.web.resource.dashboard.user.workflow.WorkflowResource._ import io.dropwizard.auth.Auth -import org.jooq.{Condition, Record9, SelectOnConditionStep} import org.jooq.impl.DSL.{groupConcatDistinct, noCondition} -import org.jooq.types.UInteger -import org.jooq.{Record, Result} +import org.jooq.{Condition, Record9, Result, SelectOnConditionStep} import java.sql.Timestamp import java.util @@ -43,7 +40,7 @@ import scala.util.control.NonFatal object WorkflowResource { final private lazy val context = SqlServer - .getInstance(StorageConfig.jdbcUrl, StorageConfig.jdbcUsername, StorageConfig.jdbcPassword) + .getInstance() .createDSLContext() final private lazy val workflowDao = new WorkflowDao(context.configuration) final private lazy val workflowOfUserDao = new WorkflowOfUserDao( @@ -54,7 +51,7 @@ object WorkflowResource { ) final private lazy val workflowOfProjectDao = new WorkflowOfProjectDao(context.configuration) - def getWorkflowName(wid: UInteger): String = { + def getWorkflowName(wid: Integer): String = { val workflow = workflowDao.fetchOneByWid(wid) if (workflow == null) { throw new NotFoundException(s"Workflow with id $wid not found") @@ -69,12 +66,12 @@ object WorkflowResource { new WorkflowUserAccess( user.getUid, workflow.getWid, - WorkflowUserAccessPrivilege.WRITE + PrivilegeEnum.WRITE ) ) } - private def workflowOfUserExists(wid: UInteger, uid: UInteger): Boolean = { + private def workflowOfUserExists(wid: Integer, uid: Integer): Boolean = { workflowOfUserDao.existsById( context .newRecord(WORKFLOW_OF_USER.UID, WORKFLOW_OF_USER.WID) @@ -82,7 +79,7 @@ object WorkflowResource { ) } - private def workflowOfProjectExists(wid: UInteger, pid: UInteger): Boolean = { + private def workflowOfProjectExists(wid: Integer, pid: Integer): Boolean = { workflowOfProjectDao.existsById( context .newRecord(WORKFLOW_OF_PROJECT.WID, WORKFLOW_OF_PROJECT.PID) @@ -95,22 +92,22 @@ object WorkflowResource { accessLevel: String, ownerName: String, workflow: Workflow, - projectIDs: List[UInteger], - ownerId: UInteger + projectIDs: List[Integer], + ownerId: Integer ) case class WorkflowWithPrivilege( name: String, description: String, - wid: UInteger, + wid: Integer, content: String, creationTime: Timestamp, lastModifiedTime: Timestamp, - isPublished: Byte, + isPublished: Boolean, readonly: Boolean ) - case class WorkflowIDs(wids: List[UInteger], pid: Option[UInteger]) + case class WorkflowIDs(wids: List[Integer], pid: Option[Integer]) private def updateWorkflowField( workflow: Workflow, @@ -163,13 +160,13 @@ object WorkflowResource { } def baseWorkflowSelect(): SelectOnConditionStep[Record9[ - UInteger, + Integer, String, String, Timestamp, Timestamp, - WorkflowUserAccessPrivilege, - UInteger, + PrivilegeEnum, + Integer, String, String ]] = { @@ -198,17 +195,17 @@ object WorkflowResource { def mapWorkflowEntries( workflowEntries: Result[Record9[ - UInteger, + Integer, String, String, Timestamp, Timestamp, - WorkflowUserAccessPrivilege, - UInteger, + PrivilegeEnum, + Integer, String, String ]], - uid: UInteger + uid: Integer ): List[DashboardWorkflow] = { workflowEntries .map(workflowRecord => @@ -223,9 +220,9 @@ object WorkflowResource { .toString, workflowRecord.into(USER).getName, workflowRecord.into(WORKFLOW).into(classOf[Workflow]), - if (workflowRecord.component9() == null) List[UInteger]() + if (workflowRecord.component9() == null) List[Integer]() else - workflowRecord.component9().split(',').map(number => UInteger.valueOf(number)).toList, + workflowRecord.component9().split(',').map(str => Integer.valueOf(str)).toList, workflowRecord.into(WORKFLOW_OF_USER).getUid ) ) @@ -341,7 +338,16 @@ class WorkflowResource extends LazyLogging { val user = sessionUser.getUser val workflowEntries = baseWorkflowSelect() .where(WORKFLOW_USER_ACCESS.UID.eq(user.getUid)) - .groupBy(WORKFLOW.WID, WORKFLOW_OF_USER.UID) + .groupBy( + WORKFLOW.WID, + WORKFLOW.NAME, + WORKFLOW.DESCRIPTION, + WORKFLOW.CREATION_TIME, + WORKFLOW.LAST_MODIFIED_TIME, + WORKFLOW_USER_ACCESS.PRIVILEGE, + WORKFLOW_OF_USER.UID, + USER.NAME + ) .fetch() mapWorkflowEntries(workflowEntries, user.getUid) } @@ -358,7 +364,7 @@ class WorkflowResource extends LazyLogging { @RolesAllowed(Array("REGULAR", "ADMIN")) @Path("/{wid}") def retrieveWorkflow( - @PathParam("wid") wid: UInteger, + @PathParam("wid") wid: Integer, @Auth user: SessionUser ): WorkflowWithPrivilege = { if (WorkflowAccessResource.hasReadAccess(wid, user.getUid)) { @@ -451,13 +457,13 @@ class WorkflowResource extends LazyLogging { val oldWorkflow: Workflow = workflowDao.fetchOneByWid(wid) val newWorkflow = createWorkflow( new Workflow( + null, oldWorkflow.getName + "_copy", oldWorkflow.getDescription, - null, assignNewOperatorIds(oldWorkflow.getContent), null, null, - 0.toByte + false ), sessionUser ) @@ -491,20 +497,20 @@ class WorkflowResource extends LazyLogging { @RolesAllowed(Array("REGULAR", "ADMIN")) @Path("/clone/{wid}") def cloneWorkflow( - @PathParam("wid") wid: UInteger, + @PathParam("wid") wid: Integer, @Auth sessionUser: SessionUser, @Context request: HttpServletRequest - ): UInteger = { + ): Integer = { val oldWorkflow: Workflow = workflowDao.fetchOneByWid(wid) val newWorkflow: DashboardWorkflow = createWorkflow( new Workflow( + null, oldWorkflow.getName + "_clone", oldWorkflow.getDescription, - null, assignNewOperatorIds(oldWorkflow.getContent), null, null, - 0.toByte + false ), sessionUser ) @@ -534,10 +540,10 @@ class WorkflowResource extends LazyLogging { WorkflowVersionResource.insertVersion(workflow, insertingNewWorkflow = true) DashboardWorkflow( isOwner = true, - WorkflowUserAccessPrivilege.WRITE.toString, + PrivilegeEnum.WRITE.toString, user.getName, workflowDao.fetchOneByWid(workflow.getWid), - List[UInteger](), + List[Integer](), user.getUid ) } @@ -598,27 +604,27 @@ class WorkflowResource extends LazyLogging { @PUT @RolesAllowed(Array("REGULAR", "ADMIN")) @Path("/public/{wid}") - def makePublic(@PathParam("wid") wid: UInteger, @Auth user: SessionUser): Unit = { + def makePublic(@PathParam("wid") wid: Integer, @Auth user: SessionUser): Unit = { val workflow: Workflow = workflowDao.fetchOneByWid(wid) - workflow.setIsPublic(1.toByte) + workflow.setIsPublic(true) workflowDao.update(workflow) } @PUT @RolesAllowed(Array("REGULAR", "ADMIN")) @Path("/private/{wid}") - def makePrivate(@PathParam("wid") wid: UInteger): Unit = { + def makePrivate(@PathParam("wid") wid: Integer): Unit = { val workflow: Workflow = workflowDao.fetchOneByWid(wid) - workflow.setIsPublic(0.toByte) + workflow.setIsPublic(false) workflowDao.update(workflow) } @GET @RolesAllowed(Array("REGULAR", "ADMIN")) @Path("/type/{wid}") - def getWorkflowType(@PathParam("wid") wid: UInteger): String = { + def getWorkflowType(@PathParam("wid") wid: Integer): String = { val workflow: Workflow = workflowDao.fetchOneByWid(wid) - if (workflow.getIsPublic == 1.toByte) { + if (workflow.getIsPublic) { "Public" } else { "Private" @@ -627,7 +633,7 @@ class WorkflowResource extends LazyLogging { @GET @Path("/owner_user") - def getOwnerUser(@QueryParam("wid") wid: UInteger): User = { + def getOwnerUser(@QueryParam("wid") wid: Integer): User = { context .select( USER.UID, @@ -647,7 +653,7 @@ class WorkflowResource extends LazyLogging { @GET @Path("/workflow_name") - def getWorkflowName(@QueryParam("wid") wid: UInteger): String = { + def getWorkflowName(@QueryParam("wid") wid: Integer): String = { context .select( WORKFLOW.NAME @@ -660,7 +666,7 @@ class WorkflowResource extends LazyLogging { @GET @Path("/public/{wid}") def retrievePublicWorkflow( - @PathParam("wid") wid: UInteger + @PathParam("wid") wid: Integer ): WorkflowWithPrivilege = { val workflow = workflowDao.ctx .selectFrom(WORKFLOW) @@ -681,7 +687,7 @@ class WorkflowResource extends LazyLogging { @GET @Path("/workflow_description") - def getWorkflowDescription(@QueryParam("wid") wid: UInteger): String = { + def getWorkflowDescription(@QueryParam("wid") wid: Integer): String = { context .select( WORKFLOW.DESCRIPTION @@ -694,8 +700,8 @@ class WorkflowResource extends LazyLogging { @GET @Path("/workflow_user_access") def workflowUserAccess( - @QueryParam("wid") wid: UInteger - ): util.List[UInteger] = { + @QueryParam("wid") wid: Integer + ): util.List[Integer] = { val records = context .select(WORKFLOW_USER_ACCESS.UID) .from(WORKFLOW_USER_ACCESS) diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/workflow/WorkflowVersionResource.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/workflow/WorkflowVersionResource.scala index ed2cfa95a37..0af901fee55 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/workflow/WorkflowVersionResource.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/user/workflow/WorkflowVersionResource.scala @@ -1,7 +1,6 @@ package edu.uci.ics.texera.web.resource.dashboard.user.workflow import com.flipkart.zjsonpatch.{JsonDiff, JsonPatch} -import edu.uci.ics.amber.core.storage.StorageConfig import edu.uci.ics.amber.engine.common.AmberConfig import edu.uci.ics.amber.engine.common.Utils.objectMapper import edu.uci.ics.texera.dao.SqlServer @@ -15,7 +14,6 @@ import edu.uci.ics.texera.web.resource.dashboard.user.workflow.WorkflowResource. } import edu.uci.ics.texera.web.resource.dashboard.user.workflow.WorkflowVersionResource._ import io.dropwizard.auth.Auth -import org.jooq.types.UInteger import java.sql.Timestamp import javax.annotation.security.RolesAllowed @@ -30,7 +28,7 @@ import scala.jdk.CollectionConverters.IterableHasAsScala object WorkflowVersionResource { final private lazy val context = SqlServer - .getInstance(StorageConfig.jdbcUrl, StorageConfig.jdbcUsername, StorageConfig.jdbcPassword) + .getInstance() .createDSLContext() final private lazy val workflowVersionDao = new WorkflowVersionDao(context.configuration) final private lazy val workflowDao = new WorkflowDao(context.configuration) @@ -72,7 +70,7 @@ object WorkflowVersionResource { * @param patch to update latest version * @param wid */ - private def updateLatestVersion(patch: String, wid: UInteger): Unit = { + private def updateLatestVersion(patch: String, wid: Integer): Unit = { // get the latest version to update its content val vid = getLatestVersion(wid) val workflowVersion = workflowVersionDao.fetchOneByVid(vid) @@ -86,12 +84,12 @@ object WorkflowVersionResource { * @param wid * @return vid */ - def getLatestVersion(wid: UInteger): UInteger = { + def getLatestVersion(wid: Integer): Integer = { val versions = context .select(WORKFLOW_VERSION.VID) .from(WORKFLOW_VERSION) .where(WORKFLOW_VERSION.WID.eq(wid)) - .fetchInto(classOf[UInteger]) + .fetchInto(classOf[Integer]) .asScala .toList // for backwards compatibility check, old constructed versions would follow the old design by not saving the current @@ -108,7 +106,7 @@ object WorkflowVersionResource { * * @param wid */ - def insertNewVersion(wid: UInteger, content: String = "[]"): WorkflowVersion = { + def insertNewVersion(wid: Integer, content: String = "[]"): WorkflowVersion = { val workflowVersion = new WorkflowVersion() workflowVersion.setContent(content) workflowVersion.setWid(wid) @@ -125,9 +123,9 @@ object WorkflowVersionResource { * @return a list of contents as strings */ def isSnapshotInRangeUnimportant( - lowerBound: UInteger, - UpperBound: UInteger, - wid: UInteger + lowerBound: Integer, + UpperBound: Integer, + wid: Integer ): Boolean = { if (lowerBound == UpperBound) { return true @@ -282,7 +280,7 @@ object WorkflowVersionResource { * @param importance false is not an important version and true is an important version */ case class VersionEntry( - vId: UInteger, + vId: Integer, creationTime: Timestamp, content: String, importance: Boolean @@ -304,7 +302,7 @@ class WorkflowVersionResource { @Path("/{wid}") @RolesAllowed(Array("REGULAR", "ADMIN")) def retrieveVersionsOfWorkflow( - @PathParam("wid") wid: UInteger, + @PathParam("wid") wid: Integer, @Auth sessionUser: SessionUser ): List[VersionEntry] = { val user = sessionUser.getUser @@ -338,8 +336,8 @@ class WorkflowVersionResource { @Path("/{wid}/{vid}") @RolesAllowed(Array("REGULAR", "ADMIN")) def retrieveWorkflowVersion( - @PathParam("wid") wid: UInteger, - @PathParam("vid") vid: UInteger, + @PathParam("wid") wid: Integer, + @PathParam("vid") vid: Integer, @Auth sessionUser: SessionUser ): Workflow = { val user = sessionUser.getUser @@ -367,10 +365,10 @@ class WorkflowVersionResource { @Path("/clone/{vid}") @RolesAllowed(Array("REGULAR", "ADMIN")) def cloneVersion( - @PathParam("vid") vid: UInteger, + @PathParam("vid") vid: Integer, @Auth sessionUser: SessionUser, requestBody: java.util.Map[String, Int] - ): UInteger = { + ): Integer = { val displayedVersionId = requestBody.get("displayedVersionId") // Fetch the workflow ID (`wid`) associated with the specified version (`vid`) @@ -394,13 +392,13 @@ class WorkflowVersionResource { try { workflowResource.createWorkflow( new Workflow( + null, newWorkflowName, workflowVersion.getDescription, - null, assignNewOperatorIds(workflowVersion.getContent), null, null, - 0.toByte + false ), sessionUser ) diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/service/ExecutionsMetadataPersistService.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/service/ExecutionsMetadataPersistService.scala index 0016b89a480..7707b5911c6 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/service/ExecutionsMetadataPersistService.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/service/ExecutionsMetadataPersistService.scala @@ -1,7 +1,6 @@ package edu.uci.ics.texera.web.service import com.typesafe.scalalogging.LazyLogging -import edu.uci.ics.amber.core.storage.StorageConfig import edu.uci.ics.amber.core.workflow.WorkflowContext.DEFAULT_EXECUTION_ID import edu.uci.ics.amber.engine.common.AmberConfig import edu.uci.ics.amber.core.virtualidentity.{ExecutionIdentity, WorkflowIdentity} @@ -9,7 +8,6 @@ import edu.uci.ics.texera.dao.SqlServer import edu.uci.ics.texera.dao.jooq.generated.tables.daos.WorkflowExecutionsDao import edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowExecutions import edu.uci.ics.texera.web.resource.dashboard.user.workflow.WorkflowVersionResource._ -import org.jooq.types.UInteger import java.sql.Timestamp @@ -19,9 +17,9 @@ import java.sql.Timestamp */ object ExecutionsMetadataPersistService extends LazyLogging { final private lazy val context = SqlServer - .getInstance(StorageConfig.jdbcUrl, StorageConfig.jdbcUsername, StorageConfig.jdbcPassword) + .getInstance() .createDSLContext() - private val workflowExecutionsDao = new WorkflowExecutionsDao( + private lazy val workflowExecutionsDao = new WorkflowExecutionsDao( context.configuration ) @@ -35,13 +33,13 @@ object ExecutionsMetadataPersistService extends LazyLogging { def insertNewExecution( workflowId: WorkflowIdentity, - uid: Option[UInteger], + uid: Option[Integer], executionName: String, environmentVersion: String ): ExecutionIdentity = { if (!AmberConfig.isUserSystemEnabled) return DEFAULT_EXECUTION_ID // first retrieve the latest version of this workflow - val vid = getLatestVersion(UInteger.valueOf(workflowId.id)) + val vid = getLatestVersion(workflowId.id.toInt) val newExecution = new WorkflowExecutions() if (executionName != "") { newExecution.setName(executionName) @@ -57,7 +55,7 @@ object ExecutionsMetadataPersistService extends LazyLogging { def tryGetExistingExecution(executionId: ExecutionIdentity): Option[WorkflowExecutions] = { if (!AmberConfig.isUserSystemEnabled) return None try { - Some(workflowExecutionsDao.fetchOneByEid(UInteger.valueOf(executionId.id))) + Some(workflowExecutionsDao.fetchOneByEid(executionId.id.toInt)) } catch { case t: Throwable => logger.info("Unable to get execution. Error = " + t.getMessage) @@ -70,7 +68,7 @@ object ExecutionsMetadataPersistService extends LazyLogging { )(updateFunc: WorkflowExecutions => Unit): Unit = { if (!AmberConfig.isUserSystemEnabled) return try { - val execution = workflowExecutionsDao.fetchOneByEid(UInteger.valueOf(executionId.id)) + val execution = workflowExecutionsDao.fetchOneByEid(executionId.id.toInt) updateFunc(execution) workflowExecutionsDao.update(execution) } catch { diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/service/ResultExportService.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/service/ResultExportService.scala index 2de178e0c86..9b0ad494d3b 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/service/ResultExportService.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/service/ResultExportService.scala @@ -22,7 +22,6 @@ import edu.uci.ics.texera.web.resource.dashboard.user.workflow.{ WorkflowExecutionsResource, WorkflowVersionResource } -import org.jooq.types.UInteger import edu.uci.ics.amber.util.ArrowUtils import edu.uci.ics.texera.web.service.WorkflowExecutionService.getLatestExecutionId @@ -445,7 +444,7 @@ class ResultExportService(workflowIdentity: WorkflowIdentity) { private def generateFileName(request: ResultExportRequest, extension: String): String = { val latestVersion = - WorkflowVersionResource.getLatestVersion(UInteger.valueOf(request.workflowId)) + WorkflowVersionResource.getLatestVersion(Integer.valueOf(request.workflowId)) val timestamp = LocalDateTime .now() .truncatedTo(ChronoUnit.SECONDS) @@ -464,10 +463,10 @@ class ResultExportService(workflowIdentity: WorkflowIdentity) { fileName: String ): Unit = { request.datasetIds.foreach { did => - val datasetPath = PathUtils.getDatasetPath(UInteger.valueOf(did)) + val datasetPath = PathUtils.getDatasetPath(Integer.valueOf(did)) val filePath = datasetPath.resolve(fileName) createNewDatasetVersionByAddingFiles( - UInteger.valueOf(did), + Integer.valueOf(did), user, Map(filePath -> pipedInputStream) ) diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/service/WorkflowEmailNotifier.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/service/WorkflowEmailNotifier.scala index 508ab8f5700..4c851c6fc76 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/service/WorkflowEmailNotifier.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/service/WorkflowEmailNotifier.scala @@ -5,7 +5,6 @@ import edu.uci.ics.amber.engine.architecture.rpc.controlreturns.WorkflowAggregat import edu.uci.ics.texera.web.resource.dashboard.user.workflow.WorkflowResource import edu.uci.ics.texera.web.resource.{EmailMessage, GmailResource} import org.hibernate.validator.internal.constraintvalidators.hv.EmailValidator -import org.jooq.types.UInteger import java.net.URI import java.time.format.DateTimeFormatter @@ -16,7 +15,7 @@ class WorkflowEmailNotifier( userEmail: String, sessionUri: URI ) extends EmailNotifier { - private val workflowName = WorkflowResource.getWorkflowName(UInteger.valueOf(workflowId)) + private val workflowName = WorkflowResource.getWorkflowName(workflowId.toInt) private val emailValidator = new EmailValidator() private val CompletedPausedOrTerminatedStates: Set[WorkflowAggregatedState] = Set( COMPLETED, diff --git a/core/amber/src/main/scala/edu/uci/ics/texera/web/service/WorkflowExecutionService.scala b/core/amber/src/main/scala/edu/uci/ics/texera/web/service/WorkflowExecutionService.scala index d944ee95aeb..522d629ef45 100644 --- a/core/amber/src/main/scala/edu/uci/ics/texera/web/service/WorkflowExecutionService.scala +++ b/core/amber/src/main/scala/edu/uci/ics/texera/web/service/WorkflowExecutionService.scala @@ -7,9 +7,9 @@ import edu.uci.ics.amber.core.workflow.WorkflowContext.DEFAULT_EXECUTION_ID import edu.uci.ics.amber.engine.architecture.controller.{ControllerConfig, Workflow} import edu.uci.ics.amber.engine.architecture.rpc.controlcommands.EmptyRequest import edu.uci.ics.amber.engine.architecture.rpc.controlreturns.WorkflowAggregatedState._ -import edu.uci.ics.amber.engine.common.{AmberConfig, Utils} import edu.uci.ics.amber.engine.common.client.AmberClient import edu.uci.ics.amber.engine.common.executionruntimestate.ExecutionMetadataStore +import edu.uci.ics.amber.engine.common.{AmberConfig, Utils} import edu.uci.ics.texera.web.model.websocket.event.{ TexeraWebSocketEvent, WorkflowErrorEvent, @@ -21,7 +21,6 @@ import edu.uci.ics.texera.web.storage.ExecutionStateStore import edu.uci.ics.texera.web.storage.ExecutionStateStore.updateWorkflowState import edu.uci.ics.texera.web.{ComputingUnitMaster, SubscriptionManager, WebsocketInput} import edu.uci.ics.texera.workflow.{LogicalPlan, WorkflowCompiler} -import org.jooq.types.UInteger import java.net.URI import scala.collection.mutable @@ -32,7 +31,7 @@ object WorkflowExecutionService { return Some(DEFAULT_EXECUTION_ID) } WorkflowExecutionsResource - .getLatestExecutionID(UInteger.valueOf(workflowId.id)) + .getLatestExecutionID(workflowId.id.toInt) .map(eid => new ExecutionIdentity(eid.longValue())) } } diff --git a/core/amber/src/test/scala/edu/uci/ics/amber/engine/architecture/scheduling/DefaultCostEstimatorSpec.scala b/core/amber/src/test/scala/edu/uci/ics/amber/engine/architecture/scheduling/DefaultCostEstimatorSpec.scala index b8f74c7e1e2..479e210f0e7 100644 --- a/core/amber/src/test/scala/edu/uci/ics/amber/engine/architecture/scheduling/DefaultCostEstimatorSpec.scala +++ b/core/amber/src/test/scala/edu/uci/ics/amber/engine/architecture/scheduling/DefaultCostEstimatorSpec.scala @@ -13,11 +13,10 @@ import edu.uci.ics.amber.operator.aggregate.{AggregateOpDesc, AggregationFunctio import edu.uci.ics.amber.operator.keywordSearch.KeywordSearchOpDesc import edu.uci.ics.amber.operator.source.scan.csv.CSVScanSourceOpDesc import edu.uci.ics.texera.dao.MockTexeraDB -import edu.uci.ics.texera.dao.jooq.generated.enums.UserRole +import edu.uci.ics.texera.dao.jooq.generated.enums.UserRoleEnum import edu.uci.ics.texera.dao.jooq.generated.tables.daos._ import edu.uci.ics.texera.dao.jooq.generated.tables.pojos._ import edu.uci.ics.texera.workflow.LogicalLink -import org.jooq.types.UInteger import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.{BeforeAndAfterAll, BeforeAndAfterEach} @@ -40,9 +39,9 @@ class DefaultCostEstimatorSpec private val testUser: User = { val user = new User - user.setUid(UInteger.valueOf(1)) + user.setUid(Integer.valueOf(1)) user.setName("test_user") - user.setRole(UserRole.ADMIN) + user.setRole(UserRoleEnum.ADMIN) user.setPassword("123") user.setEmail("test_user@test.com") user @@ -51,7 +50,7 @@ class DefaultCostEstimatorSpec private val testWorkflowEntry: Workflow = { val workflow = new Workflow workflow.setName("test workflow") - workflow.setWid(UInteger.valueOf(1)) + workflow.setWid(Integer.valueOf(1)) workflow.setContent("test workflow content") workflow.setDescription("test description") workflow @@ -59,17 +58,17 @@ class DefaultCostEstimatorSpec private val testWorkflowVersionEntry: WorkflowVersion = { val workflowVersion = new WorkflowVersion - workflowVersion.setWid(UInteger.valueOf(1)) - workflowVersion.setVid(UInteger.valueOf(1)) + workflowVersion.setWid(Integer.valueOf(1)) + workflowVersion.setVid(Integer.valueOf(1)) workflowVersion.setContent("test version content") workflowVersion } private val testWorkflowExecutionEntry: WorkflowExecutions = { val workflowExecution = new WorkflowExecutions - workflowExecution.setEid(UInteger.valueOf(1)) - workflowExecution.setVid(UInteger.valueOf(1)) - workflowExecution.setUid(UInteger.valueOf(1)) + workflowExecution.setEid(Integer.valueOf(1)) + workflowExecution.setVid(Integer.valueOf(1)) + workflowExecution.setUid(Integer.valueOf(1)) workflowExecution.setStatus(3.toByte) workflowExecution.setEnvironmentVersion("test engine") workflowExecution diff --git a/core/amber/src/test/scala/edu/uci/ics/amber/engine/e2e/DataProcessingSpec.scala b/core/amber/src/test/scala/edu/uci/ics/amber/engine/e2e/DataProcessingSpec.scala index 601915ecbb9..01ff5e67ba1 100644 --- a/core/amber/src/test/scala/edu/uci/ics/amber/engine/e2e/DataProcessingSpec.scala +++ b/core/amber/src/test/scala/edu/uci/ics/amber/engine/e2e/DataProcessingSpec.scala @@ -113,12 +113,11 @@ class DataProcessingSpec val table: String = "test" val username: String = "root" val password: String = "" - val driver = new com.mysql.cj.jdbc.Driver() + val driver = new org.postgresql.Driver() DriverManager.registerDriver(driver) val config = DBConfigurationBuilder.newBuilder .setPort(0) // 0 => automatically detect free port - .addArg("--default-time-zone=+0:00") .build() inMemoryMySQLInstance = Option(DB.newEmbeddedDB(config)) diff --git a/core/amber/src/test/scala/edu/uci/ics/texera/web/resource/dashboard/file/WorkflowResourceSpec.scala b/core/amber/src/test/scala/edu/uci/ics/texera/web/resource/dashboard/file/WorkflowResourceSpec.scala index b6de9bb8fed..a02f462211e 100644 --- a/core/amber/src/test/scala/edu/uci/ics/texera/web/resource/dashboard/file/WorkflowResourceSpec.scala +++ b/core/amber/src/test/scala/edu/uci/ics/texera/web/resource/dashboard/file/WorkflowResourceSpec.scala @@ -3,7 +3,7 @@ package edu.uci.ics.texera.web.resource.dashboard.file import edu.uci.ics.texera.dao.MockTexeraDB import edu.uci.ics.texera.web.auth.SessionUser import edu.uci.ics.texera.dao.jooq.generated.Tables.{USER, WORKFLOW, WORKFLOW_OF_PROJECT} -import edu.uci.ics.texera.dao.jooq.generated.enums.UserRole +import edu.uci.ics.texera.dao.jooq.generated.enums.UserRoleEnum import edu.uci.ics.texera.dao.jooq.generated.tables.daos.UserDao import edu.uci.ics.texera.dao.jooq.generated.tables.pojos.{Project, User, Workflow} import edu.uci.ics.texera.web.resource.dashboard.DashboardResource.SearchQueryParams @@ -16,7 +16,7 @@ import edu.uci.ics.texera.web.resource.dashboard.user.workflow.WorkflowResource. import edu.uci.ics.texera.web.resource.dashboard.{DashboardResource, FulltextSearchQueryUtils} import org.jooq.Condition import org.jooq.impl.DSL.noCondition -import org.jooq.types.UInteger + import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.{BeforeAndAfterAll, BeforeAndAfterEach} @@ -34,18 +34,18 @@ class WorkflowResourceSpec private val testUser: User = { val user = new User - user.setUid(UInteger.valueOf(1)) + user.setUid(Integer.valueOf(1)) user.setName("test_user") - user.setRole(UserRole.ADMIN) + user.setRole(UserRoleEnum.ADMIN) user.setPassword("123") user } private val testUser2: User = { val user = new User - user.setUid(UInteger.valueOf(2)) + user.setUid(Integer.valueOf(2)) user.setName("test_user2") - user.setRole(UserRole.ADMIN) + user.setRole(UserRoleEnum.ADMIN) user.setPassword("123") user } @@ -364,43 +364,43 @@ class WorkflowResourceSpec } it should "return a proper condition for a single projectId" in { - val projectIdList = new java.util.ArrayList[UInteger](util.Arrays.asList(UInteger.valueOf(1))) + val projectIdList = new java.util.ArrayList[Integer](util.Arrays.asList(Integer.valueOf(1))) val projectFilter: Condition = FulltextSearchQueryUtils.getContainsFilter(projectIdList, WORKFLOW_OF_PROJECT.PID) - assert(projectFilter.toString == WORKFLOW_OF_PROJECT.PID.eq(UInteger.valueOf(1)).toString) + assert(projectFilter.toString == WORKFLOW_OF_PROJECT.PID.eq(Integer.valueOf(1)).toString) } it should "return a proper condition for multiple projectIds" in { - val projectIdList = new java.util.ArrayList[UInteger]( - util.Arrays.asList(UInteger.valueOf(1), UInteger.valueOf(2)) + val projectIdList = new java.util.ArrayList[Integer]( + util.Arrays.asList(Integer.valueOf(1), Integer.valueOf(2)) ) val projectFilter: Condition = FulltextSearchQueryUtils.getContainsFilter(projectIdList, WORKFLOW_OF_PROJECT.PID) assert( projectFilter.toString == WORKFLOW_OF_PROJECT.PID - .eq(UInteger.valueOf(1)) - .or(WORKFLOW_OF_PROJECT.PID.eq(UInteger.valueOf(2))) + .eq(Integer.valueOf(1)) + .or(WORKFLOW_OF_PROJECT.PID.eq(Integer.valueOf(2))) .toString ) } it should "return a proper condition for a single workflowID" in { - val workflowIdList = new java.util.ArrayList[UInteger](util.Arrays.asList(UInteger.valueOf(1))) + val workflowIdList = new java.util.ArrayList[Integer](util.Arrays.asList(Integer.valueOf(1))) val workflowIdFilter: Condition = FulltextSearchQueryUtils.getContainsFilter(workflowIdList, WORKFLOW.WID) - assert(workflowIdFilter.toString == WORKFLOW.WID.eq(UInteger.valueOf(1)).toString) + assert(workflowIdFilter.toString == WORKFLOW.WID.eq(Integer.valueOf(1)).toString) } it should "return a proper condition for multiple workflowIDs" in { - val workflowIdList = new java.util.ArrayList[UInteger]( - util.Arrays.asList(UInteger.valueOf(1), UInteger.valueOf(2)) + val workflowIdList = new java.util.ArrayList[Integer]( + util.Arrays.asList(Integer.valueOf(1), Integer.valueOf(2)) ) val workflowIdFilter: Condition = FulltextSearchQueryUtils.getContainsFilter(workflowIdList, WORKFLOW.WID) assert( workflowIdFilter.toString == WORKFLOW.WID - .eq(UInteger.valueOf(1)) - .or(WORKFLOW.WID.eq(UInteger.valueOf(2))) + .eq(Integer.valueOf(1)) + .or(WORKFLOW.WID.eq(Integer.valueOf(2))) .toString ) } diff --git a/core/dao/build.sbt b/core/dao/build.sbt index 526c37be92e..ef673546380 100644 --- a/core/dao/build.sbt +++ b/core/dao/build.sbt @@ -70,7 +70,7 @@ libraryDependencies ++= Seq( "org.scalatest" %% "scalatest" % "3.2.15" % Test, // ScalaTest "junit" % "junit" % "4.13.2" % Test, // JUnit "com.novocode" % "junit-interface" % "0.11" % Test, // SBT interface for JUnit - "ch.vorburger.mariaDB4j" % "mariaDB4j" % "2.4.0" % Test // for mocking DB + "io.zonky.test" % "embedded-postgres" % "2.1.0" % Test // For mock postgres DB ) ///////////////////////////////////////////////////////////////////////////// @@ -78,8 +78,8 @@ libraryDependencies ++= Seq( ///////////////////////////////////////////////////////////////////////////// libraryDependencies ++= Seq( - "org.jooq" % "jooq" % "3.14.16", - "org.jooq" % "jooq-codegen" % "3.12.4" + "org.jooq" % "jooq" % "3.16.10", + "org.jooq" % "jooq-codegen" % "3.16.10" ) ///////////////////////////////////////////////////////////////////////////// @@ -88,5 +88,6 @@ libraryDependencies ++= Seq( libraryDependencies ++= Seq( "mysql" % "mysql-connector-java" % "8.0.33", // MySQL connector + "org.postgresql" % "postgresql" % "42.7.4", "org.yaml" % "snakeyaml" % "1.30", // for reading storage config yaml file ) \ No newline at end of file diff --git a/core/dao/src/main/resources/jooq-conf.xml b/core/dao/src/main/resources/jooq-conf.xml index 2935bce5073..1909565fadf 100644 --- a/core/dao/src/main/resources/jooq-conf.xml +++ b/core/dao/src/main/resources/jooq-conf.xml @@ -3,7 +3,7 @@ false - + false true true @@ -17,7 +17,7 @@ - org.jooq.meta.mysql.MySQLDatabase + org.jooq.meta.postgres.PostgresDatabase @@ -32,7 +32,12 @@ (A Java regular expression. Use the pipe to separate several expressions). Excludes match before includes, i.e. excludes have a higher priority --> (test_.*)|(ignore_.*) - + + + TIMESTAMP + (?i)TIMESTAMP + + diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/JooqCodeGenerator.scala b/core/dao/src/main/scala/edu/uci/ics/texera/dao/JooqCodeGenerator.scala index f0297781434..b560525f85d 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/JooqCodeGenerator.scala +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/JooqCodeGenerator.scala @@ -38,7 +38,7 @@ object JooqCodeGenerator { // Set JDBC configuration for jOOQ val jooqJdbcConfig = new Jdbc - jooqJdbcConfig.setDriver("com.mysql.cj.jdbc.Driver") + jooqJdbcConfig.setDriver("org.postgresql.Driver") jooqJdbcConfig.setUrl(jdbcConfig("url").toString) jooqJdbcConfig.setUsername(jdbcConfig("username").toString) jooqJdbcConfig.setPassword(jdbcConfig("password").toString) diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/SqlServer.scala b/core/dao/src/main/scala/edu/uci/ics/texera/dao/SqlServer.scala index f1915fb16f9..2748bf1e948 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/SqlServer.scala +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/SqlServer.scala @@ -1,8 +1,8 @@ package edu.uci.ics.texera.dao -import com.mysql.cj.jdbc.MysqlDataSource -import org.jooq.{DSLContext, SQLDialect} import org.jooq.impl.DSL +import org.jooq.{DSLContext, SQLDialect} +import org.postgresql.ds.PGSimpleDataSource /** * SqlServer class that manages a connection to a MySQL database using jOOQ. @@ -12,15 +12,14 @@ import org.jooq.impl.DSL * @param password The password for authenticating with the MySQL database. */ class SqlServer private (url: String, user: String, password: String) { - val SQL_DIALECT: SQLDialect = SQLDialect.MYSQL - private val dataSource: MysqlDataSource = new MysqlDataSource() - var context: DSLContext = _ - - { + val SQL_DIALECT: SQLDialect = SQLDialect.POSTGRES + private val dataSource: PGSimpleDataSource = new PGSimpleDataSource() + var context: DSLContext = { dataSource.setUrl(url) dataSource.setUser(user) dataSource.setPassword(password) - context = DSL.using(dataSource, SQL_DIALECT) + dataSource.setConnectTimeout(5) + DSL.using(dataSource, SQL_DIALECT) } def createDSLContext(): DSLContext = context @@ -31,24 +30,19 @@ class SqlServer private (url: String, user: String, password: String) { } object SqlServer { - @volatile private var instance: Option[SqlServer] = None + private var instance: Option[SqlServer] = None - def getInstance(url: String, user: String, password: String): SqlServer = { - instance match { - case Some(server) => server - case None => - synchronized { - instance match { - case Some(server) => server - case None => - val server = new SqlServer(url, user, password) - instance = Some(server) - server - } - } + def initConnection(url: String, user: String, password: String): Unit = { + if (instance.isEmpty) { + val server = new SqlServer(url, user, password) + instance = Some(server) } } + def getInstance(): SqlServer = { + instance.get + } + /** * A utility function for create a transaction block using given sql context * @param dsl the sql context diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/DefaultCatalog.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/DefaultCatalog.java index 276732fc44f..e62a434d605 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/DefaultCatalog.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/DefaultCatalog.java @@ -4,10 +4,10 @@ package edu.uci.ics.texera.dao.jooq.generated; -import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import org.jooq.Constants; import org.jooq.Schema; import org.jooq.impl.CatalogImpl; @@ -18,17 +18,17 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class DefaultCatalog extends CatalogImpl { - private static final long serialVersionUID = 1757128142; + private static final long serialVersionUID = 1L; /** - * The reference instance of + * The reference instance of DEFAULT_CATALOG */ public static final DefaultCatalog DEFAULT_CATALOG = new DefaultCatalog(); /** * The schema texera_db. */ - public final TexeraDb TEXERA_DB = edu.uci.ics.texera.dao.jooq.generated.TexeraDb.TEXERA_DB; + public final TexeraDb TEXERA_DB = TexeraDb.TEXERA_DB; /** * No further instances allowed @@ -39,13 +39,16 @@ private DefaultCatalog() { @Override public final List getSchemas() { - List result = new ArrayList(); - result.addAll(getSchemas0()); - return result; + return Arrays.asList( + TexeraDb.TEXERA_DB + ); } - private final List getSchemas0() { - return Arrays.asList( - TexeraDb.TEXERA_DB); - } + /** + * A reference to the 3.16 minor release of the code generator. If this + * doesn't compile, it's because the runtime library uses an older minor + * release, namely: 3.16. You can turn off the generation of this reference + * by specifying /configuration/generator/generate/jooqVersionReference + */ + private static final String REQUIRE_RUNTIME_JOOQ_VERSION = Constants.VERSION_3_16; } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/Indexes.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/Indexes.java deleted file mode 100644 index f3b7cf15bf4..00000000000 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/Indexes.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * This file is generated by jOOQ. - */ -package edu.uci.ics.texera.dao.jooq.generated; - - -import edu.uci.ics.texera.dao.jooq.generated.tables.Dataset; -import edu.uci.ics.texera.dao.jooq.generated.tables.DatasetUserAccess; -import edu.uci.ics.texera.dao.jooq.generated.tables.DatasetUserLikes; -import edu.uci.ics.texera.dao.jooq.generated.tables.DatasetVersion; -import edu.uci.ics.texera.dao.jooq.generated.tables.DatasetViewCount; -import edu.uci.ics.texera.dao.jooq.generated.tables.OperatorExecutions; -import edu.uci.ics.texera.dao.jooq.generated.tables.OperatorPortExecutions; -import edu.uci.ics.texera.dao.jooq.generated.tables.Project; -import edu.uci.ics.texera.dao.jooq.generated.tables.ProjectUserAccess; -import edu.uci.ics.texera.dao.jooq.generated.tables.PublicProject; -import edu.uci.ics.texera.dao.jooq.generated.tables.User; -import edu.uci.ics.texera.dao.jooq.generated.tables.UserConfig; -import edu.uci.ics.texera.dao.jooq.generated.tables.Workflow; -import edu.uci.ics.texera.dao.jooq.generated.tables.WorkflowExecutions; -import edu.uci.ics.texera.dao.jooq.generated.tables.WorkflowOfProject; -import edu.uci.ics.texera.dao.jooq.generated.tables.WorkflowOfUser; -import edu.uci.ics.texera.dao.jooq.generated.tables.WorkflowUserAccess; -import edu.uci.ics.texera.dao.jooq.generated.tables.WorkflowUserClones; -import edu.uci.ics.texera.dao.jooq.generated.tables.WorkflowUserLikes; -import edu.uci.ics.texera.dao.jooq.generated.tables.WorkflowVersion; -import edu.uci.ics.texera.dao.jooq.generated.tables.WorkflowViewCount; - -import org.jooq.Index; -import org.jooq.OrderField; -import org.jooq.impl.Internal; - - -/** - * A class modelling indexes of tables of the texera_db schema. - */ -@SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class Indexes { - - // ------------------------------------------------------------------------- - // INDEX definitions - // ------------------------------------------------------------------------- - - public static final Index DATASET_IDX_DATASET_NAME_DESCRIPTION = Indexes0.DATASET_IDX_DATASET_NAME_DESCRIPTION; - public static final Index DATASET_OWNER_UID = Indexes0.DATASET_OWNER_UID; - public static final Index DATASET_PRIMARY = Indexes0.DATASET_PRIMARY; - public static final Index DATASET_USER_ACCESS_PRIMARY = Indexes0.DATASET_USER_ACCESS_PRIMARY; - public static final Index DATASET_USER_ACCESS_UID = Indexes0.DATASET_USER_ACCESS_UID; - public static final Index DATASET_USER_LIKES_DID = Indexes0.DATASET_USER_LIKES_DID; - public static final Index DATASET_USER_LIKES_PRIMARY = Indexes0.DATASET_USER_LIKES_PRIMARY; - public static final Index DATASET_VERSION_DID = Indexes0.DATASET_VERSION_DID; - public static final Index DATASET_VERSION_IDX_DATASET_VERSION_NAME = Indexes0.DATASET_VERSION_IDX_DATASET_VERSION_NAME; - public static final Index DATASET_VERSION_PRIMARY = Indexes0.DATASET_VERSION_PRIMARY; - public static final Index DATASET_VIEW_COUNT_PRIMARY = Indexes0.DATASET_VIEW_COUNT_PRIMARY; - public static final Index OPERATOR_EXECUTIONS_WORKFLOW_EXECUTION_ID = Indexes0.OPERATOR_EXECUTIONS_WORKFLOW_EXECUTION_ID; - public static final Index OPERATOR_PORT_EXECUTIONS_WORKFLOW_EXECUTION_ID = Indexes0.OPERATOR_PORT_EXECUTIONS_WORKFLOW_EXECUTION_ID; - public static final Index PROJECT_IDX_USER_PROJECT_NAME_DESCRIPTION = Indexes0.PROJECT_IDX_USER_PROJECT_NAME_DESCRIPTION; - public static final Index PROJECT_OWNER_ID = Indexes0.PROJECT_OWNER_ID; - public static final Index PROJECT_PRIMARY = Indexes0.PROJECT_PRIMARY; - public static final Index PROJECT_USER_ACCESS_PID = Indexes0.PROJECT_USER_ACCESS_PID; - public static final Index PROJECT_USER_ACCESS_PRIMARY = Indexes0.PROJECT_USER_ACCESS_PRIMARY; - public static final Index PUBLIC_PROJECT_PRIMARY = Indexes0.PUBLIC_PROJECT_PRIMARY; - public static final Index USER_EMAIL = Indexes0.USER_EMAIL; - public static final Index USER_GOOGLE_ID = Indexes0.USER_GOOGLE_ID; - public static final Index USER_IDX_USER_NAME = Indexes0.USER_IDX_USER_NAME; - public static final Index USER_PRIMARY = Indexes0.USER_PRIMARY; - public static final Index USER_CONFIG_PRIMARY = Indexes0.USER_CONFIG_PRIMARY; - public static final Index WORKFLOW_IDX_WORKFLOW_NAME_DESCRIPTION_CONTENT = Indexes0.WORKFLOW_IDX_WORKFLOW_NAME_DESCRIPTION_CONTENT; - public static final Index WORKFLOW_PRIMARY = Indexes0.WORKFLOW_PRIMARY; - public static final Index WORKFLOW_EXECUTIONS_PRIMARY = Indexes0.WORKFLOW_EXECUTIONS_PRIMARY; - public static final Index WORKFLOW_EXECUTIONS_UID = Indexes0.WORKFLOW_EXECUTIONS_UID; - public static final Index WORKFLOW_EXECUTIONS_VID = Indexes0.WORKFLOW_EXECUTIONS_VID; - public static final Index WORKFLOW_OF_PROJECT_PID = Indexes0.WORKFLOW_OF_PROJECT_PID; - public static final Index WORKFLOW_OF_PROJECT_PRIMARY = Indexes0.WORKFLOW_OF_PROJECT_PRIMARY; - public static final Index WORKFLOW_OF_USER_PRIMARY = Indexes0.WORKFLOW_OF_USER_PRIMARY; - public static final Index WORKFLOW_OF_USER_WID = Indexes0.WORKFLOW_OF_USER_WID; - public static final Index WORKFLOW_USER_ACCESS_PRIMARY = Indexes0.WORKFLOW_USER_ACCESS_PRIMARY; - public static final Index WORKFLOW_USER_ACCESS_WID = Indexes0.WORKFLOW_USER_ACCESS_WID; - public static final Index WORKFLOW_USER_CLONES_PRIMARY = Indexes0.WORKFLOW_USER_CLONES_PRIMARY; - public static final Index WORKFLOW_USER_CLONES_WID = Indexes0.WORKFLOW_USER_CLONES_WID; - public static final Index WORKFLOW_USER_LIKES_PRIMARY = Indexes0.WORKFLOW_USER_LIKES_PRIMARY; - public static final Index WORKFLOW_USER_LIKES_WID = Indexes0.WORKFLOW_USER_LIKES_WID; - public static final Index WORKFLOW_VERSION_PRIMARY = Indexes0.WORKFLOW_VERSION_PRIMARY; - public static final Index WORKFLOW_VERSION_WID = Indexes0.WORKFLOW_VERSION_WID; - public static final Index WORKFLOW_VIEW_COUNT_PRIMARY = Indexes0.WORKFLOW_VIEW_COUNT_PRIMARY; - - // ------------------------------------------------------------------------- - // [#1459] distribute members to avoid static initialisers > 64kb - // ------------------------------------------------------------------------- - - private static class Indexes0 { - public static Index DATASET_IDX_DATASET_NAME_DESCRIPTION = Internal.createIndex("idx_dataset_name_description", Dataset.DATASET, new OrderField[] { Dataset.DATASET.NAME, Dataset.DATASET.DESCRIPTION }, false); - public static Index DATASET_OWNER_UID = Internal.createIndex("owner_uid", Dataset.DATASET, new OrderField[] { Dataset.DATASET.OWNER_UID }, false); - public static Index DATASET_PRIMARY = Internal.createIndex("PRIMARY", Dataset.DATASET, new OrderField[] { Dataset.DATASET.DID }, true); - public static Index DATASET_USER_ACCESS_PRIMARY = Internal.createIndex("PRIMARY", DatasetUserAccess.DATASET_USER_ACCESS, new OrderField[] { DatasetUserAccess.DATASET_USER_ACCESS.DID, DatasetUserAccess.DATASET_USER_ACCESS.UID }, true); - public static Index DATASET_USER_ACCESS_UID = Internal.createIndex("uid", DatasetUserAccess.DATASET_USER_ACCESS, new OrderField[] { DatasetUserAccess.DATASET_USER_ACCESS.UID }, false); - public static Index DATASET_USER_LIKES_DID = Internal.createIndex("did", DatasetUserLikes.DATASET_USER_LIKES, new OrderField[] { DatasetUserLikes.DATASET_USER_LIKES.DID }, false); - public static Index DATASET_USER_LIKES_PRIMARY = Internal.createIndex("PRIMARY", DatasetUserLikes.DATASET_USER_LIKES, new OrderField[] { DatasetUserLikes.DATASET_USER_LIKES.UID, DatasetUserLikes.DATASET_USER_LIKES.DID }, true); - public static Index DATASET_VERSION_DID = Internal.createIndex("did", DatasetVersion.DATASET_VERSION, new OrderField[] { DatasetVersion.DATASET_VERSION.DID }, false); - public static Index DATASET_VERSION_IDX_DATASET_VERSION_NAME = Internal.createIndex("idx_dataset_version_name", DatasetVersion.DATASET_VERSION, new OrderField[] { DatasetVersion.DATASET_VERSION.NAME }, false); - public static Index DATASET_VERSION_PRIMARY = Internal.createIndex("PRIMARY", DatasetVersion.DATASET_VERSION, new OrderField[] { DatasetVersion.DATASET_VERSION.DVID }, true); - public static Index DATASET_VIEW_COUNT_PRIMARY = Internal.createIndex("PRIMARY", DatasetViewCount.DATASET_VIEW_COUNT, new OrderField[] { DatasetViewCount.DATASET_VIEW_COUNT.DID }, true); - public static Index OPERATOR_EXECUTIONS_WORKFLOW_EXECUTION_ID = Internal.createIndex("workflow_execution_id", OperatorExecutions.OPERATOR_EXECUTIONS, new OrderField[] { OperatorExecutions.OPERATOR_EXECUTIONS.WORKFLOW_EXECUTION_ID, OperatorExecutions.OPERATOR_EXECUTIONS.OPERATOR_ID }, true); - public static Index OPERATOR_PORT_EXECUTIONS_WORKFLOW_EXECUTION_ID = Internal.createIndex("workflow_execution_id", OperatorPortExecutions.OPERATOR_PORT_EXECUTIONS, new OrderField[] { OperatorPortExecutions.OPERATOR_PORT_EXECUTIONS.WORKFLOW_EXECUTION_ID, OperatorPortExecutions.OPERATOR_PORT_EXECUTIONS.OPERATOR_ID, OperatorPortExecutions.OPERATOR_PORT_EXECUTIONS.PORT_ID }, true); - public static Index PROJECT_IDX_USER_PROJECT_NAME_DESCRIPTION = Internal.createIndex("idx_user_project_name_description", Project.PROJECT, new OrderField[] { Project.PROJECT.NAME, Project.PROJECT.DESCRIPTION }, false); - public static Index PROJECT_OWNER_ID = Internal.createIndex("owner_id", Project.PROJECT, new OrderField[] { Project.PROJECT.OWNER_ID, Project.PROJECT.NAME }, true); - public static Index PROJECT_PRIMARY = Internal.createIndex("PRIMARY", Project.PROJECT, new OrderField[] { Project.PROJECT.PID }, true); - public static Index PROJECT_USER_ACCESS_PID = Internal.createIndex("pid", ProjectUserAccess.PROJECT_USER_ACCESS, new OrderField[] { ProjectUserAccess.PROJECT_USER_ACCESS.PID }, false); - public static Index PROJECT_USER_ACCESS_PRIMARY = Internal.createIndex("PRIMARY", ProjectUserAccess.PROJECT_USER_ACCESS, new OrderField[] { ProjectUserAccess.PROJECT_USER_ACCESS.UID, ProjectUserAccess.PROJECT_USER_ACCESS.PID }, true); - public static Index PUBLIC_PROJECT_PRIMARY = Internal.createIndex("PRIMARY", PublicProject.PUBLIC_PROJECT, new OrderField[] { PublicProject.PUBLIC_PROJECT.PID }, true); - public static Index USER_EMAIL = Internal.createIndex("email", User.USER, new OrderField[] { User.USER.EMAIL }, true); - public static Index USER_GOOGLE_ID = Internal.createIndex("google_id", User.USER, new OrderField[] { User.USER.GOOGLE_ID }, true); - public static Index USER_IDX_USER_NAME = Internal.createIndex("idx_user_name", User.USER, new OrderField[] { User.USER.NAME }, false); - public static Index USER_PRIMARY = Internal.createIndex("PRIMARY", User.USER, new OrderField[] { User.USER.UID }, true); - public static Index USER_CONFIG_PRIMARY = Internal.createIndex("PRIMARY", UserConfig.USER_CONFIG, new OrderField[] { UserConfig.USER_CONFIG.UID, UserConfig.USER_CONFIG.KEY }, true); - public static Index WORKFLOW_IDX_WORKFLOW_NAME_DESCRIPTION_CONTENT = Internal.createIndex("idx_workflow_name_description_content", Workflow.WORKFLOW, new OrderField[] { Workflow.WORKFLOW.NAME, Workflow.WORKFLOW.DESCRIPTION, Workflow.WORKFLOW.CONTENT }, false); - public static Index WORKFLOW_PRIMARY = Internal.createIndex("PRIMARY", Workflow.WORKFLOW, new OrderField[] { Workflow.WORKFLOW.WID }, true); - public static Index WORKFLOW_EXECUTIONS_PRIMARY = Internal.createIndex("PRIMARY", WorkflowExecutions.WORKFLOW_EXECUTIONS, new OrderField[] { WorkflowExecutions.WORKFLOW_EXECUTIONS.EID }, true); - public static Index WORKFLOW_EXECUTIONS_UID = Internal.createIndex("uid", WorkflowExecutions.WORKFLOW_EXECUTIONS, new OrderField[] { WorkflowExecutions.WORKFLOW_EXECUTIONS.UID }, false); - public static Index WORKFLOW_EXECUTIONS_VID = Internal.createIndex("vid", WorkflowExecutions.WORKFLOW_EXECUTIONS, new OrderField[] { WorkflowExecutions.WORKFLOW_EXECUTIONS.VID }, false); - public static Index WORKFLOW_OF_PROJECT_PID = Internal.createIndex("pid", WorkflowOfProject.WORKFLOW_OF_PROJECT, new OrderField[] { WorkflowOfProject.WORKFLOW_OF_PROJECT.PID }, false); - public static Index WORKFLOW_OF_PROJECT_PRIMARY = Internal.createIndex("PRIMARY", WorkflowOfProject.WORKFLOW_OF_PROJECT, new OrderField[] { WorkflowOfProject.WORKFLOW_OF_PROJECT.WID, WorkflowOfProject.WORKFLOW_OF_PROJECT.PID }, true); - public static Index WORKFLOW_OF_USER_PRIMARY = Internal.createIndex("PRIMARY", WorkflowOfUser.WORKFLOW_OF_USER, new OrderField[] { WorkflowOfUser.WORKFLOW_OF_USER.UID, WorkflowOfUser.WORKFLOW_OF_USER.WID }, true); - public static Index WORKFLOW_OF_USER_WID = Internal.createIndex("wid", WorkflowOfUser.WORKFLOW_OF_USER, new OrderField[] { WorkflowOfUser.WORKFLOW_OF_USER.WID }, false); - public static Index WORKFLOW_USER_ACCESS_PRIMARY = Internal.createIndex("PRIMARY", WorkflowUserAccess.WORKFLOW_USER_ACCESS, new OrderField[] { WorkflowUserAccess.WORKFLOW_USER_ACCESS.UID, WorkflowUserAccess.WORKFLOW_USER_ACCESS.WID }, true); - public static Index WORKFLOW_USER_ACCESS_WID = Internal.createIndex("wid", WorkflowUserAccess.WORKFLOW_USER_ACCESS, new OrderField[] { WorkflowUserAccess.WORKFLOW_USER_ACCESS.WID }, false); - public static Index WORKFLOW_USER_CLONES_PRIMARY = Internal.createIndex("PRIMARY", WorkflowUserClones.WORKFLOW_USER_CLONES, new OrderField[] { WorkflowUserClones.WORKFLOW_USER_CLONES.UID, WorkflowUserClones.WORKFLOW_USER_CLONES.WID }, true); - public static Index WORKFLOW_USER_CLONES_WID = Internal.createIndex("wid", WorkflowUserClones.WORKFLOW_USER_CLONES, new OrderField[] { WorkflowUserClones.WORKFLOW_USER_CLONES.WID }, false); - public static Index WORKFLOW_USER_LIKES_PRIMARY = Internal.createIndex("PRIMARY", WorkflowUserLikes.WORKFLOW_USER_LIKES, new OrderField[] { WorkflowUserLikes.WORKFLOW_USER_LIKES.UID, WorkflowUserLikes.WORKFLOW_USER_LIKES.WID }, true); - public static Index WORKFLOW_USER_LIKES_WID = Internal.createIndex("wid", WorkflowUserLikes.WORKFLOW_USER_LIKES, new OrderField[] { WorkflowUserLikes.WORKFLOW_USER_LIKES.WID }, false); - public static Index WORKFLOW_VERSION_PRIMARY = Internal.createIndex("PRIMARY", WorkflowVersion.WORKFLOW_VERSION, new OrderField[] { WorkflowVersion.WORKFLOW_VERSION.VID }, true); - public static Index WORKFLOW_VERSION_WID = Internal.createIndex("wid", WorkflowVersion.WORKFLOW_VERSION, new OrderField[] { WorkflowVersion.WORKFLOW_VERSION.WID }, false); - public static Index WORKFLOW_VIEW_COUNT_PRIMARY = Internal.createIndex("PRIMARY", WorkflowViewCount.WORKFLOW_VIEW_COUNT, new OrderField[] { WorkflowViewCount.WORKFLOW_VIEW_COUNT.WID }, true); - } -} diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/Keys.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/Keys.java index c2def618e62..093fb4c2480 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/Keys.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/Keys.java @@ -48,162 +48,78 @@ import edu.uci.ics.texera.dao.jooq.generated.tables.records.WorkflowViewCountRecord; import org.jooq.ForeignKey; -import org.jooq.Identity; +import org.jooq.TableField; import org.jooq.UniqueKey; +import org.jooq.impl.DSL; import org.jooq.impl.Internal; -import org.jooq.types.UInteger; /** - * A class modelling foreign key relationships and constraints of tables of - * the texera_db schema. + * A class modelling foreign key relationships and constraints of tables in + * texera_db. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class Keys { - // ------------------------------------------------------------------------- - // IDENTITY definitions - // ------------------------------------------------------------------------- - - public static final Identity IDENTITY_DATASET = Identities0.IDENTITY_DATASET; - public static final Identity IDENTITY_DATASET_VERSION = Identities0.IDENTITY_DATASET_VERSION; - public static final Identity IDENTITY_PROJECT = Identities0.IDENTITY_PROJECT; - public static final Identity IDENTITY_USER = Identities0.IDENTITY_USER; - public static final Identity IDENTITY_WORKFLOW = Identities0.IDENTITY_WORKFLOW; - public static final Identity IDENTITY_WORKFLOW_EXECUTIONS = Identities0.IDENTITY_WORKFLOW_EXECUTIONS; - public static final Identity IDENTITY_WORKFLOW_VERSION = Identities0.IDENTITY_WORKFLOW_VERSION; - // ------------------------------------------------------------------------- // UNIQUE and PRIMARY KEY definitions // ------------------------------------------------------------------------- - public static final UniqueKey KEY_DATASET_PRIMARY = UniqueKeys0.KEY_DATASET_PRIMARY; - public static final UniqueKey KEY_DATASET_USER_ACCESS_PRIMARY = UniqueKeys0.KEY_DATASET_USER_ACCESS_PRIMARY; - public static final UniqueKey KEY_DATASET_USER_LIKES_PRIMARY = UniqueKeys0.KEY_DATASET_USER_LIKES_PRIMARY; - public static final UniqueKey KEY_DATASET_VERSION_PRIMARY = UniqueKeys0.KEY_DATASET_VERSION_PRIMARY; - public static final UniqueKey KEY_DATASET_VIEW_COUNT_PRIMARY = UniqueKeys0.KEY_DATASET_VIEW_COUNT_PRIMARY; - public static final UniqueKey KEY_OPERATOR_EXECUTIONS_WORKFLOW_EXECUTION_ID = UniqueKeys0.KEY_OPERATOR_EXECUTIONS_WORKFLOW_EXECUTION_ID; - public static final UniqueKey KEY_OPERATOR_PORT_EXECUTIONS_WORKFLOW_EXECUTION_ID = UniqueKeys0.KEY_OPERATOR_PORT_EXECUTIONS_WORKFLOW_EXECUTION_ID; - public static final UniqueKey KEY_PROJECT_PRIMARY = UniqueKeys0.KEY_PROJECT_PRIMARY; - public static final UniqueKey KEY_PROJECT_OWNER_ID = UniqueKeys0.KEY_PROJECT_OWNER_ID; - public static final UniqueKey KEY_PROJECT_USER_ACCESS_PRIMARY = UniqueKeys0.KEY_PROJECT_USER_ACCESS_PRIMARY; - public static final UniqueKey KEY_PUBLIC_PROJECT_PRIMARY = UniqueKeys0.KEY_PUBLIC_PROJECT_PRIMARY; - public static final UniqueKey KEY_USER_PRIMARY = UniqueKeys0.KEY_USER_PRIMARY; - public static final UniqueKey KEY_USER_EMAIL = UniqueKeys0.KEY_USER_EMAIL; - public static final UniqueKey KEY_USER_GOOGLE_ID = UniqueKeys0.KEY_USER_GOOGLE_ID; - public static final UniqueKey KEY_USER_CONFIG_PRIMARY = UniqueKeys0.KEY_USER_CONFIG_PRIMARY; - public static final UniqueKey KEY_WORKFLOW_PRIMARY = UniqueKeys0.KEY_WORKFLOW_PRIMARY; - public static final UniqueKey KEY_WORKFLOW_EXECUTIONS_PRIMARY = UniqueKeys0.KEY_WORKFLOW_EXECUTIONS_PRIMARY; - public static final UniqueKey KEY_WORKFLOW_OF_PROJECT_PRIMARY = UniqueKeys0.KEY_WORKFLOW_OF_PROJECT_PRIMARY; - public static final UniqueKey KEY_WORKFLOW_OF_USER_PRIMARY = UniqueKeys0.KEY_WORKFLOW_OF_USER_PRIMARY; - public static final UniqueKey KEY_WORKFLOW_USER_ACCESS_PRIMARY = UniqueKeys0.KEY_WORKFLOW_USER_ACCESS_PRIMARY; - public static final UniqueKey KEY_WORKFLOW_USER_CLONES_PRIMARY = UniqueKeys0.KEY_WORKFLOW_USER_CLONES_PRIMARY; - public static final UniqueKey KEY_WORKFLOW_USER_LIKES_PRIMARY = UniqueKeys0.KEY_WORKFLOW_USER_LIKES_PRIMARY; - public static final UniqueKey KEY_WORKFLOW_VERSION_PRIMARY = UniqueKeys0.KEY_WORKFLOW_VERSION_PRIMARY; - public static final UniqueKey KEY_WORKFLOW_VIEW_COUNT_PRIMARY = UniqueKeys0.KEY_WORKFLOW_VIEW_COUNT_PRIMARY; + public static final UniqueKey DATASET_PKEY = Internal.createUniqueKey(Dataset.DATASET, DSL.name("dataset_pkey"), new TableField[] { Dataset.DATASET.DID }, true); + public static final UniqueKey DATASET_USER_ACCESS_PKEY = Internal.createUniqueKey(DatasetUserAccess.DATASET_USER_ACCESS, DSL.name("dataset_user_access_pkey"), new TableField[] { DatasetUserAccess.DATASET_USER_ACCESS.DID, DatasetUserAccess.DATASET_USER_ACCESS.UID }, true); + public static final UniqueKey DATASET_USER_LIKES_PKEY = Internal.createUniqueKey(DatasetUserLikes.DATASET_USER_LIKES, DSL.name("dataset_user_likes_pkey"), new TableField[] { DatasetUserLikes.DATASET_USER_LIKES.UID, DatasetUserLikes.DATASET_USER_LIKES.DID }, true); + public static final UniqueKey DATASET_VERSION_PKEY = Internal.createUniqueKey(DatasetVersion.DATASET_VERSION, DSL.name("dataset_version_pkey"), new TableField[] { DatasetVersion.DATASET_VERSION.DVID }, true); + public static final UniqueKey DATASET_VIEW_COUNT_PKEY = Internal.createUniqueKey(DatasetViewCount.DATASET_VIEW_COUNT, DSL.name("dataset_view_count_pkey"), new TableField[] { DatasetViewCount.DATASET_VIEW_COUNT.DID }, true); + public static final UniqueKey OPERATOR_EXECUTIONS_PKEY = Internal.createUniqueKey(OperatorExecutions.OPERATOR_EXECUTIONS, DSL.name("operator_executions_pkey"), new TableField[] { OperatorExecutions.OPERATOR_EXECUTIONS.WORKFLOW_EXECUTION_ID, OperatorExecutions.OPERATOR_EXECUTIONS.OPERATOR_ID }, true); + public static final UniqueKey OPERATOR_PORT_EXECUTIONS_PKEY = Internal.createUniqueKey(OperatorPortExecutions.OPERATOR_PORT_EXECUTIONS, DSL.name("operator_port_executions_pkey"), new TableField[] { OperatorPortExecutions.OPERATOR_PORT_EXECUTIONS.WORKFLOW_EXECUTION_ID, OperatorPortExecutions.OPERATOR_PORT_EXECUTIONS.OPERATOR_ID, OperatorPortExecutions.OPERATOR_PORT_EXECUTIONS.PORT_ID }, true); + public static final UniqueKey PROJECT_OWNER_ID_NAME_KEY = Internal.createUniqueKey(Project.PROJECT, DSL.name("project_owner_id_name_key"), new TableField[] { Project.PROJECT.OWNER_ID, Project.PROJECT.NAME }, true); + public static final UniqueKey PROJECT_PKEY = Internal.createUniqueKey(Project.PROJECT, DSL.name("project_pkey"), new TableField[] { Project.PROJECT.PID }, true); + public static final UniqueKey PROJECT_USER_ACCESS_PKEY = Internal.createUniqueKey(ProjectUserAccess.PROJECT_USER_ACCESS, DSL.name("project_user_access_pkey"), new TableField[] { ProjectUserAccess.PROJECT_USER_ACCESS.UID, ProjectUserAccess.PROJECT_USER_ACCESS.PID }, true); + public static final UniqueKey PUBLIC_PROJECT_PKEY = Internal.createUniqueKey(PublicProject.PUBLIC_PROJECT, DSL.name("public_project_pkey"), new TableField[] { PublicProject.PUBLIC_PROJECT.PID }, true); + public static final UniqueKey USER_EMAIL_KEY = Internal.createUniqueKey(User.USER, DSL.name("user_email_key"), new TableField[] { User.USER.EMAIL }, true); + public static final UniqueKey USER_GOOGLE_ID_KEY = Internal.createUniqueKey(User.USER, DSL.name("user_google_id_key"), new TableField[] { User.USER.GOOGLE_ID }, true); + public static final UniqueKey USER_PKEY = Internal.createUniqueKey(User.USER, DSL.name("user_pkey"), new TableField[] { User.USER.UID }, true); + public static final UniqueKey USER_CONFIG_PKEY = Internal.createUniqueKey(UserConfig.USER_CONFIG, DSL.name("user_config_pkey"), new TableField[] { UserConfig.USER_CONFIG.UID, UserConfig.USER_CONFIG.KEY }, true); + public static final UniqueKey WORKFLOW_PKEY = Internal.createUniqueKey(Workflow.WORKFLOW, DSL.name("workflow_pkey"), new TableField[] { Workflow.WORKFLOW.WID }, true); + public static final UniqueKey WORKFLOW_EXECUTIONS_PKEY = Internal.createUniqueKey(WorkflowExecutions.WORKFLOW_EXECUTIONS, DSL.name("workflow_executions_pkey"), new TableField[] { WorkflowExecutions.WORKFLOW_EXECUTIONS.EID }, true); + public static final UniqueKey WORKFLOW_OF_PROJECT_PKEY = Internal.createUniqueKey(WorkflowOfProject.WORKFLOW_OF_PROJECT, DSL.name("workflow_of_project_pkey"), new TableField[] { WorkflowOfProject.WORKFLOW_OF_PROJECT.WID, WorkflowOfProject.WORKFLOW_OF_PROJECT.PID }, true); + public static final UniqueKey WORKFLOW_OF_USER_PKEY = Internal.createUniqueKey(WorkflowOfUser.WORKFLOW_OF_USER, DSL.name("workflow_of_user_pkey"), new TableField[] { WorkflowOfUser.WORKFLOW_OF_USER.UID, WorkflowOfUser.WORKFLOW_OF_USER.WID }, true); + public static final UniqueKey WORKFLOW_USER_ACCESS_PKEY = Internal.createUniqueKey(WorkflowUserAccess.WORKFLOW_USER_ACCESS, DSL.name("workflow_user_access_pkey"), new TableField[] { WorkflowUserAccess.WORKFLOW_USER_ACCESS.UID, WorkflowUserAccess.WORKFLOW_USER_ACCESS.WID }, true); + public static final UniqueKey WORKFLOW_USER_CLONES_PKEY = Internal.createUniqueKey(WorkflowUserClones.WORKFLOW_USER_CLONES, DSL.name("workflow_user_clones_pkey"), new TableField[] { WorkflowUserClones.WORKFLOW_USER_CLONES.UID, WorkflowUserClones.WORKFLOW_USER_CLONES.WID }, true); + public static final UniqueKey WORKFLOW_USER_LIKES_PKEY = Internal.createUniqueKey(WorkflowUserLikes.WORKFLOW_USER_LIKES, DSL.name("workflow_user_likes_pkey"), new TableField[] { WorkflowUserLikes.WORKFLOW_USER_LIKES.UID, WorkflowUserLikes.WORKFLOW_USER_LIKES.WID }, true); + public static final UniqueKey WORKFLOW_VERSION_PKEY = Internal.createUniqueKey(WorkflowVersion.WORKFLOW_VERSION, DSL.name("workflow_version_pkey"), new TableField[] { WorkflowVersion.WORKFLOW_VERSION.VID }, true); + public static final UniqueKey WORKFLOW_VIEW_COUNT_PKEY = Internal.createUniqueKey(WorkflowViewCount.WORKFLOW_VIEW_COUNT, DSL.name("workflow_view_count_pkey"), new TableField[] { WorkflowViewCount.WORKFLOW_VIEW_COUNT.WID }, true); // ------------------------------------------------------------------------- // FOREIGN KEY definitions // ------------------------------------------------------------------------- - public static final ForeignKey DATASET_IBFK_1 = ForeignKeys0.DATASET_IBFK_1; - public static final ForeignKey DATASET_USER_ACCESS_IBFK_1 = ForeignKeys0.DATASET_USER_ACCESS_IBFK_1; - public static final ForeignKey DATASET_USER_ACCESS_IBFK_2 = ForeignKeys0.DATASET_USER_ACCESS_IBFK_2; - public static final ForeignKey DATASET_USER_LIKES_IBFK_1 = ForeignKeys0.DATASET_USER_LIKES_IBFK_1; - public static final ForeignKey DATASET_USER_LIKES_IBFK_2 = ForeignKeys0.DATASET_USER_LIKES_IBFK_2; - public static final ForeignKey DATASET_VERSION_IBFK_1 = ForeignKeys0.DATASET_VERSION_IBFK_1; - public static final ForeignKey DATASET_VIEW_COUNT_IBFK_1 = ForeignKeys0.DATASET_VIEW_COUNT_IBFK_1; - public static final ForeignKey OPERATOR_EXECUTIONS_IBFK_1 = ForeignKeys0.OPERATOR_EXECUTIONS_IBFK_1; - public static final ForeignKey OPERATOR_PORT_EXECUTIONS_IBFK_1 = ForeignKeys0.OPERATOR_PORT_EXECUTIONS_IBFK_1; - public static final ForeignKey PROJECT_IBFK_1 = ForeignKeys0.PROJECT_IBFK_1; - public static final ForeignKey PROJECT_USER_ACCESS_IBFK_1 = ForeignKeys0.PROJECT_USER_ACCESS_IBFK_1; - public static final ForeignKey PROJECT_USER_ACCESS_IBFK_2 = ForeignKeys0.PROJECT_USER_ACCESS_IBFK_2; - public static final ForeignKey PUBLIC_PROJECT_IBFK_1 = ForeignKeys0.PUBLIC_PROJECT_IBFK_1; - public static final ForeignKey USER_CONFIG_IBFK_1 = ForeignKeys0.USER_CONFIG_IBFK_1; - public static final ForeignKey WORKFLOW_EXECUTIONS_IBFK_1 = ForeignKeys0.WORKFLOW_EXECUTIONS_IBFK_1; - public static final ForeignKey WORKFLOW_EXECUTIONS_IBFK_2 = ForeignKeys0.WORKFLOW_EXECUTIONS_IBFK_2; - public static final ForeignKey WORKFLOW_OF_PROJECT_IBFK_1 = ForeignKeys0.WORKFLOW_OF_PROJECT_IBFK_1; - public static final ForeignKey WORKFLOW_OF_PROJECT_IBFK_2 = ForeignKeys0.WORKFLOW_OF_PROJECT_IBFK_2; - public static final ForeignKey WORKFLOW_OF_USER_IBFK_1 = ForeignKeys0.WORKFLOW_OF_USER_IBFK_1; - public static final ForeignKey WORKFLOW_OF_USER_IBFK_2 = ForeignKeys0.WORKFLOW_OF_USER_IBFK_2; - public static final ForeignKey WORKFLOW_USER_ACCESS_IBFK_1 = ForeignKeys0.WORKFLOW_USER_ACCESS_IBFK_1; - public static final ForeignKey WORKFLOW_USER_ACCESS_IBFK_2 = ForeignKeys0.WORKFLOW_USER_ACCESS_IBFK_2; - public static final ForeignKey WORKFLOW_USER_CLONES_IBFK_1 = ForeignKeys0.WORKFLOW_USER_CLONES_IBFK_1; - public static final ForeignKey WORKFLOW_USER_CLONES_IBFK_2 = ForeignKeys0.WORKFLOW_USER_CLONES_IBFK_2; - public static final ForeignKey WORKFLOW_USER_LIKES_IBFK_1 = ForeignKeys0.WORKFLOW_USER_LIKES_IBFK_1; - public static final ForeignKey WORKFLOW_USER_LIKES_IBFK_2 = ForeignKeys0.WORKFLOW_USER_LIKES_IBFK_2; - public static final ForeignKey WORKFLOW_VERSION_IBFK_1 = ForeignKeys0.WORKFLOW_VERSION_IBFK_1; - public static final ForeignKey WORKFLOW_VIEW_COUNT_IBFK_1 = ForeignKeys0.WORKFLOW_VIEW_COUNT_IBFK_1; - - // ------------------------------------------------------------------------- - // [#1459] distribute members to avoid static initialisers > 64kb - // ------------------------------------------------------------------------- - - private static class Identities0 { - public static Identity IDENTITY_DATASET = Internal.createIdentity(Dataset.DATASET, Dataset.DATASET.DID); - public static Identity IDENTITY_DATASET_VERSION = Internal.createIdentity(DatasetVersion.DATASET_VERSION, DatasetVersion.DATASET_VERSION.DVID); - public static Identity IDENTITY_PROJECT = Internal.createIdentity(Project.PROJECT, Project.PROJECT.PID); - public static Identity IDENTITY_USER = Internal.createIdentity(User.USER, User.USER.UID); - public static Identity IDENTITY_WORKFLOW = Internal.createIdentity(Workflow.WORKFLOW, Workflow.WORKFLOW.WID); - public static Identity IDENTITY_WORKFLOW_EXECUTIONS = Internal.createIdentity(WorkflowExecutions.WORKFLOW_EXECUTIONS, WorkflowExecutions.WORKFLOW_EXECUTIONS.EID); - public static Identity IDENTITY_WORKFLOW_VERSION = Internal.createIdentity(WorkflowVersion.WORKFLOW_VERSION, WorkflowVersion.WORKFLOW_VERSION.VID); - } - - private static class UniqueKeys0 { - public static final UniqueKey KEY_DATASET_PRIMARY = Internal.createUniqueKey(Dataset.DATASET, "KEY_dataset_PRIMARY", Dataset.DATASET.DID); - public static final UniqueKey KEY_DATASET_USER_ACCESS_PRIMARY = Internal.createUniqueKey(DatasetUserAccess.DATASET_USER_ACCESS, "KEY_dataset_user_access_PRIMARY", DatasetUserAccess.DATASET_USER_ACCESS.DID, DatasetUserAccess.DATASET_USER_ACCESS.UID); - public static final UniqueKey KEY_DATASET_USER_LIKES_PRIMARY = Internal.createUniqueKey(DatasetUserLikes.DATASET_USER_LIKES, "KEY_dataset_user_likes_PRIMARY", DatasetUserLikes.DATASET_USER_LIKES.UID, DatasetUserLikes.DATASET_USER_LIKES.DID); - public static final UniqueKey KEY_DATASET_VERSION_PRIMARY = Internal.createUniqueKey(DatasetVersion.DATASET_VERSION, "KEY_dataset_version_PRIMARY", DatasetVersion.DATASET_VERSION.DVID); - public static final UniqueKey KEY_DATASET_VIEW_COUNT_PRIMARY = Internal.createUniqueKey(DatasetViewCount.DATASET_VIEW_COUNT, "KEY_dataset_view_count_PRIMARY", DatasetViewCount.DATASET_VIEW_COUNT.DID); - public static final UniqueKey KEY_OPERATOR_EXECUTIONS_WORKFLOW_EXECUTION_ID = Internal.createUniqueKey(OperatorExecutions.OPERATOR_EXECUTIONS, "KEY_operator_executions_workflow_execution_id", OperatorExecutions.OPERATOR_EXECUTIONS.WORKFLOW_EXECUTION_ID, OperatorExecutions.OPERATOR_EXECUTIONS.OPERATOR_ID); - public static final UniqueKey KEY_OPERATOR_PORT_EXECUTIONS_WORKFLOW_EXECUTION_ID = Internal.createUniqueKey(OperatorPortExecutions.OPERATOR_PORT_EXECUTIONS, "KEY_operator_port_executions_workflow_execution_id", OperatorPortExecutions.OPERATOR_PORT_EXECUTIONS.WORKFLOW_EXECUTION_ID, OperatorPortExecutions.OPERATOR_PORT_EXECUTIONS.OPERATOR_ID, OperatorPortExecutions.OPERATOR_PORT_EXECUTIONS.PORT_ID); - public static final UniqueKey KEY_PROJECT_PRIMARY = Internal.createUniqueKey(Project.PROJECT, "KEY_project_PRIMARY", Project.PROJECT.PID); - public static final UniqueKey KEY_PROJECT_OWNER_ID = Internal.createUniqueKey(Project.PROJECT, "KEY_project_owner_id", Project.PROJECT.OWNER_ID, Project.PROJECT.NAME); - public static final UniqueKey KEY_PROJECT_USER_ACCESS_PRIMARY = Internal.createUniqueKey(ProjectUserAccess.PROJECT_USER_ACCESS, "KEY_project_user_access_PRIMARY", ProjectUserAccess.PROJECT_USER_ACCESS.UID, ProjectUserAccess.PROJECT_USER_ACCESS.PID); - public static final UniqueKey KEY_PUBLIC_PROJECT_PRIMARY = Internal.createUniqueKey(PublicProject.PUBLIC_PROJECT, "KEY_public_project_PRIMARY", PublicProject.PUBLIC_PROJECT.PID); - public static final UniqueKey KEY_USER_PRIMARY = Internal.createUniqueKey(User.USER, "KEY_user_PRIMARY", User.USER.UID); - public static final UniqueKey KEY_USER_EMAIL = Internal.createUniqueKey(User.USER, "KEY_user_email", User.USER.EMAIL); - public static final UniqueKey KEY_USER_GOOGLE_ID = Internal.createUniqueKey(User.USER, "KEY_user_google_id", User.USER.GOOGLE_ID); - public static final UniqueKey KEY_USER_CONFIG_PRIMARY = Internal.createUniqueKey(UserConfig.USER_CONFIG, "KEY_user_config_PRIMARY", UserConfig.USER_CONFIG.UID, UserConfig.USER_CONFIG.KEY); - public static final UniqueKey KEY_WORKFLOW_PRIMARY = Internal.createUniqueKey(Workflow.WORKFLOW, "KEY_workflow_PRIMARY", Workflow.WORKFLOW.WID); - public static final UniqueKey KEY_WORKFLOW_EXECUTIONS_PRIMARY = Internal.createUniqueKey(WorkflowExecutions.WORKFLOW_EXECUTIONS, "KEY_workflow_executions_PRIMARY", WorkflowExecutions.WORKFLOW_EXECUTIONS.EID); - public static final UniqueKey KEY_WORKFLOW_OF_PROJECT_PRIMARY = Internal.createUniqueKey(WorkflowOfProject.WORKFLOW_OF_PROJECT, "KEY_workflow_of_project_PRIMARY", WorkflowOfProject.WORKFLOW_OF_PROJECT.WID, WorkflowOfProject.WORKFLOW_OF_PROJECT.PID); - public static final UniqueKey KEY_WORKFLOW_OF_USER_PRIMARY = Internal.createUniqueKey(WorkflowOfUser.WORKFLOW_OF_USER, "KEY_workflow_of_user_PRIMARY", WorkflowOfUser.WORKFLOW_OF_USER.UID, WorkflowOfUser.WORKFLOW_OF_USER.WID); - public static final UniqueKey KEY_WORKFLOW_USER_ACCESS_PRIMARY = Internal.createUniqueKey(WorkflowUserAccess.WORKFLOW_USER_ACCESS, "KEY_workflow_user_access_PRIMARY", WorkflowUserAccess.WORKFLOW_USER_ACCESS.UID, WorkflowUserAccess.WORKFLOW_USER_ACCESS.WID); - public static final UniqueKey KEY_WORKFLOW_USER_CLONES_PRIMARY = Internal.createUniqueKey(WorkflowUserClones.WORKFLOW_USER_CLONES, "KEY_workflow_user_clones_PRIMARY", WorkflowUserClones.WORKFLOW_USER_CLONES.UID, WorkflowUserClones.WORKFLOW_USER_CLONES.WID); - public static final UniqueKey KEY_WORKFLOW_USER_LIKES_PRIMARY = Internal.createUniqueKey(WorkflowUserLikes.WORKFLOW_USER_LIKES, "KEY_workflow_user_likes_PRIMARY", WorkflowUserLikes.WORKFLOW_USER_LIKES.UID, WorkflowUserLikes.WORKFLOW_USER_LIKES.WID); - public static final UniqueKey KEY_WORKFLOW_VERSION_PRIMARY = Internal.createUniqueKey(WorkflowVersion.WORKFLOW_VERSION, "KEY_workflow_version_PRIMARY", WorkflowVersion.WORKFLOW_VERSION.VID); - public static final UniqueKey KEY_WORKFLOW_VIEW_COUNT_PRIMARY = Internal.createUniqueKey(WorkflowViewCount.WORKFLOW_VIEW_COUNT, "KEY_workflow_view_count_PRIMARY", WorkflowViewCount.WORKFLOW_VIEW_COUNT.WID); - } - - private static class ForeignKeys0 { - public static final ForeignKey DATASET_IBFK_1 = Internal.createForeignKey(edu.uci.ics.texera.dao.jooq.generated.Keys.KEY_USER_PRIMARY, Dataset.DATASET, "dataset_ibfk_1", Dataset.DATASET.OWNER_UID); - public static final ForeignKey DATASET_USER_ACCESS_IBFK_1 = Internal.createForeignKey(edu.uci.ics.texera.dao.jooq.generated.Keys.KEY_DATASET_PRIMARY, DatasetUserAccess.DATASET_USER_ACCESS, "dataset_user_access_ibfk_1", DatasetUserAccess.DATASET_USER_ACCESS.DID); - public static final ForeignKey DATASET_USER_ACCESS_IBFK_2 = Internal.createForeignKey(edu.uci.ics.texera.dao.jooq.generated.Keys.KEY_USER_PRIMARY, DatasetUserAccess.DATASET_USER_ACCESS, "dataset_user_access_ibfk_2", DatasetUserAccess.DATASET_USER_ACCESS.UID); - public static final ForeignKey DATASET_USER_LIKES_IBFK_1 = Internal.createForeignKey(edu.uci.ics.texera.dao.jooq.generated.Keys.KEY_USER_PRIMARY, DatasetUserLikes.DATASET_USER_LIKES, "dataset_user_likes_ibfk_1", DatasetUserLikes.DATASET_USER_LIKES.UID); - public static final ForeignKey DATASET_USER_LIKES_IBFK_2 = Internal.createForeignKey(edu.uci.ics.texera.dao.jooq.generated.Keys.KEY_DATASET_PRIMARY, DatasetUserLikes.DATASET_USER_LIKES, "dataset_user_likes_ibfk_2", DatasetUserLikes.DATASET_USER_LIKES.DID); - public static final ForeignKey DATASET_VERSION_IBFK_1 = Internal.createForeignKey(edu.uci.ics.texera.dao.jooq.generated.Keys.KEY_DATASET_PRIMARY, DatasetVersion.DATASET_VERSION, "dataset_version_ibfk_1", DatasetVersion.DATASET_VERSION.DID); - public static final ForeignKey DATASET_VIEW_COUNT_IBFK_1 = Internal.createForeignKey(edu.uci.ics.texera.dao.jooq.generated.Keys.KEY_DATASET_PRIMARY, DatasetViewCount.DATASET_VIEW_COUNT, "dataset_view_count_ibfk_1", DatasetViewCount.DATASET_VIEW_COUNT.DID); - public static final ForeignKey OPERATOR_EXECUTIONS_IBFK_1 = Internal.createForeignKey(edu.uci.ics.texera.dao.jooq.generated.Keys.KEY_WORKFLOW_EXECUTIONS_PRIMARY, OperatorExecutions.OPERATOR_EXECUTIONS, "operator_executions_ibfk_1", OperatorExecutions.OPERATOR_EXECUTIONS.WORKFLOW_EXECUTION_ID); - public static final ForeignKey OPERATOR_PORT_EXECUTIONS_IBFK_1 = Internal.createForeignKey(edu.uci.ics.texera.dao.jooq.generated.Keys.KEY_WORKFLOW_EXECUTIONS_PRIMARY, OperatorPortExecutions.OPERATOR_PORT_EXECUTIONS, "operator_port_executions_ibfk_1", OperatorPortExecutions.OPERATOR_PORT_EXECUTIONS.WORKFLOW_EXECUTION_ID); - public static final ForeignKey PROJECT_IBFK_1 = Internal.createForeignKey(edu.uci.ics.texera.dao.jooq.generated.Keys.KEY_USER_PRIMARY, Project.PROJECT, "project_ibfk_1", Project.PROJECT.OWNER_ID); - public static final ForeignKey PROJECT_USER_ACCESS_IBFK_1 = Internal.createForeignKey(edu.uci.ics.texera.dao.jooq.generated.Keys.KEY_USER_PRIMARY, ProjectUserAccess.PROJECT_USER_ACCESS, "project_user_access_ibfk_1", ProjectUserAccess.PROJECT_USER_ACCESS.UID); - public static final ForeignKey PROJECT_USER_ACCESS_IBFK_2 = Internal.createForeignKey(edu.uci.ics.texera.dao.jooq.generated.Keys.KEY_PROJECT_PRIMARY, ProjectUserAccess.PROJECT_USER_ACCESS, "project_user_access_ibfk_2", ProjectUserAccess.PROJECT_USER_ACCESS.PID); - public static final ForeignKey PUBLIC_PROJECT_IBFK_1 = Internal.createForeignKey(edu.uci.ics.texera.dao.jooq.generated.Keys.KEY_PROJECT_PRIMARY, PublicProject.PUBLIC_PROJECT, "public_project_ibfk_1", PublicProject.PUBLIC_PROJECT.PID); - public static final ForeignKey USER_CONFIG_IBFK_1 = Internal.createForeignKey(edu.uci.ics.texera.dao.jooq.generated.Keys.KEY_USER_PRIMARY, UserConfig.USER_CONFIG, "user_config_ibfk_1", UserConfig.USER_CONFIG.UID); - public static final ForeignKey WORKFLOW_EXECUTIONS_IBFK_1 = Internal.createForeignKey(edu.uci.ics.texera.dao.jooq.generated.Keys.KEY_WORKFLOW_VERSION_PRIMARY, WorkflowExecutions.WORKFLOW_EXECUTIONS, "workflow_executions_ibfk_1", WorkflowExecutions.WORKFLOW_EXECUTIONS.VID); - public static final ForeignKey WORKFLOW_EXECUTIONS_IBFK_2 = Internal.createForeignKey(edu.uci.ics.texera.dao.jooq.generated.Keys.KEY_USER_PRIMARY, WorkflowExecutions.WORKFLOW_EXECUTIONS, "workflow_executions_ibfk_2", WorkflowExecutions.WORKFLOW_EXECUTIONS.UID); - public static final ForeignKey WORKFLOW_OF_PROJECT_IBFK_1 = Internal.createForeignKey(edu.uci.ics.texera.dao.jooq.generated.Keys.KEY_WORKFLOW_PRIMARY, WorkflowOfProject.WORKFLOW_OF_PROJECT, "workflow_of_project_ibfk_1", WorkflowOfProject.WORKFLOW_OF_PROJECT.WID); - public static final ForeignKey WORKFLOW_OF_PROJECT_IBFK_2 = Internal.createForeignKey(edu.uci.ics.texera.dao.jooq.generated.Keys.KEY_PROJECT_PRIMARY, WorkflowOfProject.WORKFLOW_OF_PROJECT, "workflow_of_project_ibfk_2", WorkflowOfProject.WORKFLOW_OF_PROJECT.PID); - public static final ForeignKey WORKFLOW_OF_USER_IBFK_1 = Internal.createForeignKey(edu.uci.ics.texera.dao.jooq.generated.Keys.KEY_USER_PRIMARY, WorkflowOfUser.WORKFLOW_OF_USER, "workflow_of_user_ibfk_1", WorkflowOfUser.WORKFLOW_OF_USER.UID); - public static final ForeignKey WORKFLOW_OF_USER_IBFK_2 = Internal.createForeignKey(edu.uci.ics.texera.dao.jooq.generated.Keys.KEY_WORKFLOW_PRIMARY, WorkflowOfUser.WORKFLOW_OF_USER, "workflow_of_user_ibfk_2", WorkflowOfUser.WORKFLOW_OF_USER.WID); - public static final ForeignKey WORKFLOW_USER_ACCESS_IBFK_1 = Internal.createForeignKey(edu.uci.ics.texera.dao.jooq.generated.Keys.KEY_USER_PRIMARY, WorkflowUserAccess.WORKFLOW_USER_ACCESS, "workflow_user_access_ibfk_1", WorkflowUserAccess.WORKFLOW_USER_ACCESS.UID); - public static final ForeignKey WORKFLOW_USER_ACCESS_IBFK_2 = Internal.createForeignKey(edu.uci.ics.texera.dao.jooq.generated.Keys.KEY_WORKFLOW_PRIMARY, WorkflowUserAccess.WORKFLOW_USER_ACCESS, "workflow_user_access_ibfk_2", WorkflowUserAccess.WORKFLOW_USER_ACCESS.WID); - public static final ForeignKey WORKFLOW_USER_CLONES_IBFK_1 = Internal.createForeignKey(edu.uci.ics.texera.dao.jooq.generated.Keys.KEY_USER_PRIMARY, WorkflowUserClones.WORKFLOW_USER_CLONES, "workflow_user_clones_ibfk_1", WorkflowUserClones.WORKFLOW_USER_CLONES.UID); - public static final ForeignKey WORKFLOW_USER_CLONES_IBFK_2 = Internal.createForeignKey(edu.uci.ics.texera.dao.jooq.generated.Keys.KEY_WORKFLOW_PRIMARY, WorkflowUserClones.WORKFLOW_USER_CLONES, "workflow_user_clones_ibfk_2", WorkflowUserClones.WORKFLOW_USER_CLONES.WID); - public static final ForeignKey WORKFLOW_USER_LIKES_IBFK_1 = Internal.createForeignKey(edu.uci.ics.texera.dao.jooq.generated.Keys.KEY_USER_PRIMARY, WorkflowUserLikes.WORKFLOW_USER_LIKES, "workflow_user_likes_ibfk_1", WorkflowUserLikes.WORKFLOW_USER_LIKES.UID); - public static final ForeignKey WORKFLOW_USER_LIKES_IBFK_2 = Internal.createForeignKey(edu.uci.ics.texera.dao.jooq.generated.Keys.KEY_WORKFLOW_PRIMARY, WorkflowUserLikes.WORKFLOW_USER_LIKES, "workflow_user_likes_ibfk_2", WorkflowUserLikes.WORKFLOW_USER_LIKES.WID); - public static final ForeignKey WORKFLOW_VERSION_IBFK_1 = Internal.createForeignKey(edu.uci.ics.texera.dao.jooq.generated.Keys.KEY_WORKFLOW_PRIMARY, WorkflowVersion.WORKFLOW_VERSION, "workflow_version_ibfk_1", WorkflowVersion.WORKFLOW_VERSION.WID); - public static final ForeignKey WORKFLOW_VIEW_COUNT_IBFK_1 = Internal.createForeignKey(edu.uci.ics.texera.dao.jooq.generated.Keys.KEY_WORKFLOW_PRIMARY, WorkflowViewCount.WORKFLOW_VIEW_COUNT, "workflow_view_count_ibfk_1", WorkflowViewCount.WORKFLOW_VIEW_COUNT.WID); - } + public static final ForeignKey DATASET__DATASET_OWNER_UID_FKEY = Internal.createForeignKey(Dataset.DATASET, DSL.name("dataset_owner_uid_fkey"), new TableField[] { Dataset.DATASET.OWNER_UID }, Keys.USER_PKEY, new TableField[] { User.USER.UID }, true); + public static final ForeignKey DATASET_USER_ACCESS__DATASET_USER_ACCESS_DID_FKEY = Internal.createForeignKey(DatasetUserAccess.DATASET_USER_ACCESS, DSL.name("dataset_user_access_did_fkey"), new TableField[] { DatasetUserAccess.DATASET_USER_ACCESS.DID }, Keys.DATASET_PKEY, new TableField[] { Dataset.DATASET.DID }, true); + public static final ForeignKey DATASET_USER_ACCESS__DATASET_USER_ACCESS_UID_FKEY = Internal.createForeignKey(DatasetUserAccess.DATASET_USER_ACCESS, DSL.name("dataset_user_access_uid_fkey"), new TableField[] { DatasetUserAccess.DATASET_USER_ACCESS.UID }, Keys.USER_PKEY, new TableField[] { User.USER.UID }, true); + public static final ForeignKey DATASET_USER_LIKES__DATASET_USER_LIKES_DID_FKEY = Internal.createForeignKey(DatasetUserLikes.DATASET_USER_LIKES, DSL.name("dataset_user_likes_did_fkey"), new TableField[] { DatasetUserLikes.DATASET_USER_LIKES.DID }, Keys.DATASET_PKEY, new TableField[] { Dataset.DATASET.DID }, true); + public static final ForeignKey DATASET_USER_LIKES__DATASET_USER_LIKES_UID_FKEY = Internal.createForeignKey(DatasetUserLikes.DATASET_USER_LIKES, DSL.name("dataset_user_likes_uid_fkey"), new TableField[] { DatasetUserLikes.DATASET_USER_LIKES.UID }, Keys.USER_PKEY, new TableField[] { User.USER.UID }, true); + public static final ForeignKey DATASET_VERSION__DATASET_VERSION_DID_FKEY = Internal.createForeignKey(DatasetVersion.DATASET_VERSION, DSL.name("dataset_version_did_fkey"), new TableField[] { DatasetVersion.DATASET_VERSION.DID }, Keys.DATASET_PKEY, new TableField[] { Dataset.DATASET.DID }, true); + public static final ForeignKey DATASET_VIEW_COUNT__DATASET_VIEW_COUNT_DID_FKEY = Internal.createForeignKey(DatasetViewCount.DATASET_VIEW_COUNT, DSL.name("dataset_view_count_did_fkey"), new TableField[] { DatasetViewCount.DATASET_VIEW_COUNT.DID }, Keys.DATASET_PKEY, new TableField[] { Dataset.DATASET.DID }, true); + public static final ForeignKey OPERATOR_EXECUTIONS__OPERATOR_EXECUTIONS_WORKFLOW_EXECUTION_ID_FKEY = Internal.createForeignKey(OperatorExecutions.OPERATOR_EXECUTIONS, DSL.name("operator_executions_workflow_execution_id_fkey"), new TableField[] { OperatorExecutions.OPERATOR_EXECUTIONS.WORKFLOW_EXECUTION_ID }, Keys.WORKFLOW_EXECUTIONS_PKEY, new TableField[] { WorkflowExecutions.WORKFLOW_EXECUTIONS.EID }, true); + public static final ForeignKey OPERATOR_PORT_EXECUTIONS__OPERATOR_PORT_EXECUTIONS_WORKFLOW_EXECUTION_ID_FKEY = Internal.createForeignKey(OperatorPortExecutions.OPERATOR_PORT_EXECUTIONS, DSL.name("operator_port_executions_workflow_execution_id_fkey"), new TableField[] { OperatorPortExecutions.OPERATOR_PORT_EXECUTIONS.WORKFLOW_EXECUTION_ID }, Keys.WORKFLOW_EXECUTIONS_PKEY, new TableField[] { WorkflowExecutions.WORKFLOW_EXECUTIONS.EID }, true); + public static final ForeignKey PROJECT__PROJECT_OWNER_ID_FKEY = Internal.createForeignKey(Project.PROJECT, DSL.name("project_owner_id_fkey"), new TableField[] { Project.PROJECT.OWNER_ID }, Keys.USER_PKEY, new TableField[] { User.USER.UID }, true); + public static final ForeignKey PROJECT_USER_ACCESS__PROJECT_USER_ACCESS_PID_FKEY = Internal.createForeignKey(ProjectUserAccess.PROJECT_USER_ACCESS, DSL.name("project_user_access_pid_fkey"), new TableField[] { ProjectUserAccess.PROJECT_USER_ACCESS.PID }, Keys.PROJECT_PKEY, new TableField[] { Project.PROJECT.PID }, true); + public static final ForeignKey PROJECT_USER_ACCESS__PROJECT_USER_ACCESS_UID_FKEY = Internal.createForeignKey(ProjectUserAccess.PROJECT_USER_ACCESS, DSL.name("project_user_access_uid_fkey"), new TableField[] { ProjectUserAccess.PROJECT_USER_ACCESS.UID }, Keys.USER_PKEY, new TableField[] { User.USER.UID }, true); + public static final ForeignKey PUBLIC_PROJECT__PUBLIC_PROJECT_PID_FKEY = Internal.createForeignKey(PublicProject.PUBLIC_PROJECT, DSL.name("public_project_pid_fkey"), new TableField[] { PublicProject.PUBLIC_PROJECT.PID }, Keys.PROJECT_PKEY, new TableField[] { Project.PROJECT.PID }, true); + public static final ForeignKey USER_CONFIG__USER_CONFIG_UID_FKEY = Internal.createForeignKey(UserConfig.USER_CONFIG, DSL.name("user_config_uid_fkey"), new TableField[] { UserConfig.USER_CONFIG.UID }, Keys.USER_PKEY, new TableField[] { User.USER.UID }, true); + public static final ForeignKey WORKFLOW_EXECUTIONS__WORKFLOW_EXECUTIONS_UID_FKEY = Internal.createForeignKey(WorkflowExecutions.WORKFLOW_EXECUTIONS, DSL.name("workflow_executions_uid_fkey"), new TableField[] { WorkflowExecutions.WORKFLOW_EXECUTIONS.UID }, Keys.USER_PKEY, new TableField[] { User.USER.UID }, true); + public static final ForeignKey WORKFLOW_EXECUTIONS__WORKFLOW_EXECUTIONS_VID_FKEY = Internal.createForeignKey(WorkflowExecutions.WORKFLOW_EXECUTIONS, DSL.name("workflow_executions_vid_fkey"), new TableField[] { WorkflowExecutions.WORKFLOW_EXECUTIONS.VID }, Keys.WORKFLOW_VERSION_PKEY, new TableField[] { WorkflowVersion.WORKFLOW_VERSION.VID }, true); + public static final ForeignKey WORKFLOW_OF_PROJECT__WORKFLOW_OF_PROJECT_PID_FKEY = Internal.createForeignKey(WorkflowOfProject.WORKFLOW_OF_PROJECT, DSL.name("workflow_of_project_pid_fkey"), new TableField[] { WorkflowOfProject.WORKFLOW_OF_PROJECT.PID }, Keys.PROJECT_PKEY, new TableField[] { Project.PROJECT.PID }, true); + public static final ForeignKey WORKFLOW_OF_PROJECT__WORKFLOW_OF_PROJECT_WID_FKEY = Internal.createForeignKey(WorkflowOfProject.WORKFLOW_OF_PROJECT, DSL.name("workflow_of_project_wid_fkey"), new TableField[] { WorkflowOfProject.WORKFLOW_OF_PROJECT.WID }, Keys.WORKFLOW_PKEY, new TableField[] { Workflow.WORKFLOW.WID }, true); + public static final ForeignKey WORKFLOW_OF_USER__WORKFLOW_OF_USER_UID_FKEY = Internal.createForeignKey(WorkflowOfUser.WORKFLOW_OF_USER, DSL.name("workflow_of_user_uid_fkey"), new TableField[] { WorkflowOfUser.WORKFLOW_OF_USER.UID }, Keys.USER_PKEY, new TableField[] { User.USER.UID }, true); + public static final ForeignKey WORKFLOW_OF_USER__WORKFLOW_OF_USER_WID_FKEY = Internal.createForeignKey(WorkflowOfUser.WORKFLOW_OF_USER, DSL.name("workflow_of_user_wid_fkey"), new TableField[] { WorkflowOfUser.WORKFLOW_OF_USER.WID }, Keys.WORKFLOW_PKEY, new TableField[] { Workflow.WORKFLOW.WID }, true); + public static final ForeignKey WORKFLOW_USER_ACCESS__WORKFLOW_USER_ACCESS_UID_FKEY = Internal.createForeignKey(WorkflowUserAccess.WORKFLOW_USER_ACCESS, DSL.name("workflow_user_access_uid_fkey"), new TableField[] { WorkflowUserAccess.WORKFLOW_USER_ACCESS.UID }, Keys.USER_PKEY, new TableField[] { User.USER.UID }, true); + public static final ForeignKey WORKFLOW_USER_ACCESS__WORKFLOW_USER_ACCESS_WID_FKEY = Internal.createForeignKey(WorkflowUserAccess.WORKFLOW_USER_ACCESS, DSL.name("workflow_user_access_wid_fkey"), new TableField[] { WorkflowUserAccess.WORKFLOW_USER_ACCESS.WID }, Keys.WORKFLOW_PKEY, new TableField[] { Workflow.WORKFLOW.WID }, true); + public static final ForeignKey WORKFLOW_USER_CLONES__WORKFLOW_USER_CLONES_UID_FKEY = Internal.createForeignKey(WorkflowUserClones.WORKFLOW_USER_CLONES, DSL.name("workflow_user_clones_uid_fkey"), new TableField[] { WorkflowUserClones.WORKFLOW_USER_CLONES.UID }, Keys.USER_PKEY, new TableField[] { User.USER.UID }, true); + public static final ForeignKey WORKFLOW_USER_CLONES__WORKFLOW_USER_CLONES_WID_FKEY = Internal.createForeignKey(WorkflowUserClones.WORKFLOW_USER_CLONES, DSL.name("workflow_user_clones_wid_fkey"), new TableField[] { WorkflowUserClones.WORKFLOW_USER_CLONES.WID }, Keys.WORKFLOW_PKEY, new TableField[] { Workflow.WORKFLOW.WID }, true); + public static final ForeignKey WORKFLOW_USER_LIKES__WORKFLOW_USER_LIKES_UID_FKEY = Internal.createForeignKey(WorkflowUserLikes.WORKFLOW_USER_LIKES, DSL.name("workflow_user_likes_uid_fkey"), new TableField[] { WorkflowUserLikes.WORKFLOW_USER_LIKES.UID }, Keys.USER_PKEY, new TableField[] { User.USER.UID }, true); + public static final ForeignKey WORKFLOW_USER_LIKES__WORKFLOW_USER_LIKES_WID_FKEY = Internal.createForeignKey(WorkflowUserLikes.WORKFLOW_USER_LIKES, DSL.name("workflow_user_likes_wid_fkey"), new TableField[] { WorkflowUserLikes.WORKFLOW_USER_LIKES.WID }, Keys.WORKFLOW_PKEY, new TableField[] { Workflow.WORKFLOW.WID }, true); + public static final ForeignKey WORKFLOW_VERSION__WORKFLOW_VERSION_WID_FKEY = Internal.createForeignKey(WorkflowVersion.WORKFLOW_VERSION, DSL.name("workflow_version_wid_fkey"), new TableField[] { WorkflowVersion.WORKFLOW_VERSION.WID }, Keys.WORKFLOW_PKEY, new TableField[] { Workflow.WORKFLOW.WID }, true); + public static final ForeignKey WORKFLOW_VIEW_COUNT__WORKFLOW_VIEW_COUNT_WID_FKEY = Internal.createForeignKey(WorkflowViewCount.WORKFLOW_VIEW_COUNT, DSL.name("workflow_view_count_wid_fkey"), new TableField[] { WorkflowViewCount.WORKFLOW_VIEW_COUNT.WID }, Keys.WORKFLOW_PKEY, new TableField[] { Workflow.WORKFLOW.WID }, true); } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/Tables.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/Tables.java index b8385eca46f..02dbcb77bcf 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/Tables.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/Tables.java @@ -29,7 +29,7 @@ /** - * Convenience access to all tables in texera_db + * Convenience access to all tables in texera_db. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class Tables { diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/TexeraDb.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/TexeraDb.java index e6eb7f34115..f67b14ca734 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/TexeraDb.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/TexeraDb.java @@ -27,7 +27,6 @@ import edu.uci.ics.texera.dao.jooq.generated.tables.WorkflowVersion; import edu.uci.ics.texera.dao.jooq.generated.tables.WorkflowViewCount; -import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -42,7 +41,7 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class TexeraDb extends SchemaImpl { - private static final long serialVersionUID = -590590918; + private static final long serialVersionUID = 1L; /** * The reference instance of texera_db @@ -52,112 +51,112 @@ public class TexeraDb extends SchemaImpl { /** * The table texera_db.dataset. */ - public final Dataset DATASET = edu.uci.ics.texera.dao.jooq.generated.tables.Dataset.DATASET; + public final Dataset DATASET = Dataset.DATASET; /** * The table texera_db.dataset_user_access. */ - public final DatasetUserAccess DATASET_USER_ACCESS = edu.uci.ics.texera.dao.jooq.generated.tables.DatasetUserAccess.DATASET_USER_ACCESS; + public final DatasetUserAccess DATASET_USER_ACCESS = DatasetUserAccess.DATASET_USER_ACCESS; /** * The table texera_db.dataset_user_likes. */ - public final DatasetUserLikes DATASET_USER_LIKES = edu.uci.ics.texera.dao.jooq.generated.tables.DatasetUserLikes.DATASET_USER_LIKES; + public final DatasetUserLikes DATASET_USER_LIKES = DatasetUserLikes.DATASET_USER_LIKES; /** * The table texera_db.dataset_version. */ - public final DatasetVersion DATASET_VERSION = edu.uci.ics.texera.dao.jooq.generated.tables.DatasetVersion.DATASET_VERSION; + public final DatasetVersion DATASET_VERSION = DatasetVersion.DATASET_VERSION; /** * The table texera_db.dataset_view_count. */ - public final DatasetViewCount DATASET_VIEW_COUNT = edu.uci.ics.texera.dao.jooq.generated.tables.DatasetViewCount.DATASET_VIEW_COUNT; + public final DatasetViewCount DATASET_VIEW_COUNT = DatasetViewCount.DATASET_VIEW_COUNT; /** * The table texera_db.operator_executions. */ - public final OperatorExecutions OPERATOR_EXECUTIONS = edu.uci.ics.texera.dao.jooq.generated.tables.OperatorExecutions.OPERATOR_EXECUTIONS; + public final OperatorExecutions OPERATOR_EXECUTIONS = OperatorExecutions.OPERATOR_EXECUTIONS; /** * The table texera_db.operator_port_executions. */ - public final OperatorPortExecutions OPERATOR_PORT_EXECUTIONS = edu.uci.ics.texera.dao.jooq.generated.tables.OperatorPortExecutions.OPERATOR_PORT_EXECUTIONS; + public final OperatorPortExecutions OPERATOR_PORT_EXECUTIONS = OperatorPortExecutions.OPERATOR_PORT_EXECUTIONS; /** * The table texera_db.project. */ - public final Project PROJECT = edu.uci.ics.texera.dao.jooq.generated.tables.Project.PROJECT; + public final Project PROJECT = Project.PROJECT; /** * The table texera_db.project_user_access. */ - public final ProjectUserAccess PROJECT_USER_ACCESS = edu.uci.ics.texera.dao.jooq.generated.tables.ProjectUserAccess.PROJECT_USER_ACCESS; + public final ProjectUserAccess PROJECT_USER_ACCESS = ProjectUserAccess.PROJECT_USER_ACCESS; /** * The table texera_db.public_project. */ - public final PublicProject PUBLIC_PROJECT = edu.uci.ics.texera.dao.jooq.generated.tables.PublicProject.PUBLIC_PROJECT; + public final PublicProject PUBLIC_PROJECT = PublicProject.PUBLIC_PROJECT; /** * The table texera_db.user. */ - public final User USER = edu.uci.ics.texera.dao.jooq.generated.tables.User.USER; + public final User USER = User.USER; /** * The table texera_db.user_activity. */ - public final UserActivity USER_ACTIVITY = edu.uci.ics.texera.dao.jooq.generated.tables.UserActivity.USER_ACTIVITY; + public final UserActivity USER_ACTIVITY = UserActivity.USER_ACTIVITY; /** * The table texera_db.user_config. */ - public final UserConfig USER_CONFIG = edu.uci.ics.texera.dao.jooq.generated.tables.UserConfig.USER_CONFIG; + public final UserConfig USER_CONFIG = UserConfig.USER_CONFIG; /** * The table texera_db.workflow. */ - public final Workflow WORKFLOW = edu.uci.ics.texera.dao.jooq.generated.tables.Workflow.WORKFLOW; + public final Workflow WORKFLOW = Workflow.WORKFLOW; /** * The table texera_db.workflow_executions. */ - public final WorkflowExecutions WORKFLOW_EXECUTIONS = edu.uci.ics.texera.dao.jooq.generated.tables.WorkflowExecutions.WORKFLOW_EXECUTIONS; + public final WorkflowExecutions WORKFLOW_EXECUTIONS = WorkflowExecutions.WORKFLOW_EXECUTIONS; /** * The table texera_db.workflow_of_project. */ - public final WorkflowOfProject WORKFLOW_OF_PROJECT = edu.uci.ics.texera.dao.jooq.generated.tables.WorkflowOfProject.WORKFLOW_OF_PROJECT; + public final WorkflowOfProject WORKFLOW_OF_PROJECT = WorkflowOfProject.WORKFLOW_OF_PROJECT; /** * The table texera_db.workflow_of_user. */ - public final WorkflowOfUser WORKFLOW_OF_USER = edu.uci.ics.texera.dao.jooq.generated.tables.WorkflowOfUser.WORKFLOW_OF_USER; + public final WorkflowOfUser WORKFLOW_OF_USER = WorkflowOfUser.WORKFLOW_OF_USER; /** * The table texera_db.workflow_user_access. */ - public final WorkflowUserAccess WORKFLOW_USER_ACCESS = edu.uci.ics.texera.dao.jooq.generated.tables.WorkflowUserAccess.WORKFLOW_USER_ACCESS; + public final WorkflowUserAccess WORKFLOW_USER_ACCESS = WorkflowUserAccess.WORKFLOW_USER_ACCESS; /** * The table texera_db.workflow_user_clones. */ - public final WorkflowUserClones WORKFLOW_USER_CLONES = edu.uci.ics.texera.dao.jooq.generated.tables.WorkflowUserClones.WORKFLOW_USER_CLONES; + public final WorkflowUserClones WORKFLOW_USER_CLONES = WorkflowUserClones.WORKFLOW_USER_CLONES; /** * The table texera_db.workflow_user_likes. */ - public final WorkflowUserLikes WORKFLOW_USER_LIKES = edu.uci.ics.texera.dao.jooq.generated.tables.WorkflowUserLikes.WORKFLOW_USER_LIKES; + public final WorkflowUserLikes WORKFLOW_USER_LIKES = WorkflowUserLikes.WORKFLOW_USER_LIKES; /** * The table texera_db.workflow_version. */ - public final WorkflowVersion WORKFLOW_VERSION = edu.uci.ics.texera.dao.jooq.generated.tables.WorkflowVersion.WORKFLOW_VERSION; + public final WorkflowVersion WORKFLOW_VERSION = WorkflowVersion.WORKFLOW_VERSION; /** * The table texera_db.workflow_view_count. */ - public final WorkflowViewCount WORKFLOW_VIEW_COUNT = edu.uci.ics.texera.dao.jooq.generated.tables.WorkflowViewCount.WORKFLOW_VIEW_COUNT; + public final WorkflowViewCount WORKFLOW_VIEW_COUNT = WorkflowViewCount.WORKFLOW_VIEW_COUNT; /** * No further instances allowed @@ -174,13 +173,7 @@ public Catalog getCatalog() { @Override public final List> getTables() { - List result = new ArrayList(); - result.addAll(getTables0()); - return result; - } - - private final List> getTables0() { - return Arrays.>asList( + return Arrays.asList( Dataset.DATASET, DatasetUserAccess.DATASET_USER_ACCESS, DatasetUserLikes.DATASET_USER_LIKES, @@ -202,6 +195,7 @@ private final List> getTables0() { WorkflowUserClones.WORKFLOW_USER_CLONES, WorkflowUserLikes.WORKFLOW_USER_LIKES, WorkflowVersion.WORKFLOW_VERSION, - WorkflowViewCount.WORKFLOW_VIEW_COUNT); + WorkflowViewCount.WORKFLOW_VIEW_COUNT + ); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/enums/DatasetUserAccessPrivilege.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/enums/DatasetUserAccessPrivilege.java deleted file mode 100644 index cdc1b72822f..00000000000 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/enums/DatasetUserAccessPrivilege.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * This file is generated by jOOQ. - */ -package edu.uci.ics.texera.dao.jooq.generated.enums; - - -import org.jooq.Catalog; -import org.jooq.EnumType; -import org.jooq.Schema; - - -/** - * This class is generated by jOOQ. - */ -@SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public enum DatasetUserAccessPrivilege implements EnumType { - - NONE("NONE"), - - READ("READ"), - - WRITE("WRITE"); - - private final String literal; - - private DatasetUserAccessPrivilege(String literal) { - this.literal = literal; - } - - @Override - public Catalog getCatalog() { - return null; - } - - @Override - public Schema getSchema() { - return null; - } - - @Override - public String getName() { - return "dataset_user_access_privilege"; - } - - @Override - public String getLiteral() { - return literal; - } -} diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/enums/WorkflowUserAccessPrivilege.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/enums/PrivilegeEnum.java similarity index 57% rename from core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/enums/WorkflowUserAccessPrivilege.java rename to core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/enums/PrivilegeEnum.java index eb7f0f96eb0..06997a14e52 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/enums/WorkflowUserAccessPrivilege.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/enums/PrivilegeEnum.java @@ -4,6 +4,8 @@ package edu.uci.ics.texera.dao.jooq.generated.enums; +import edu.uci.ics.texera.dao.jooq.generated.TexeraDb; + import org.jooq.Catalog; import org.jooq.EnumType; import org.jooq.Schema; @@ -13,7 +15,7 @@ * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public enum WorkflowUserAccessPrivilege implements EnumType { +public enum PrivilegeEnum implements EnumType { NONE("NONE"), @@ -23,27 +25,34 @@ public enum WorkflowUserAccessPrivilege implements EnumType { private final String literal; - private WorkflowUserAccessPrivilege(String literal) { + private PrivilegeEnum(String literal) { this.literal = literal; } @Override public Catalog getCatalog() { - return null; + return getSchema().getCatalog(); } @Override public Schema getSchema() { - return null; + return TexeraDb.TEXERA_DB; } @Override public String getName() { - return "workflow_user_access_privilege"; + return "privilege_enum"; } @Override public String getLiteral() { return literal; } + + /** + * Lookup a value of this EnumType by its literal + */ + public static PrivilegeEnum lookupLiteral(String literal) { + return EnumType.lookupLiteral(PrivilegeEnum.class, literal); + } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/enums/ProjectUserAccessPrivilege.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/enums/ProjectUserAccessPrivilege.java deleted file mode 100644 index 180ae85380e..00000000000 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/enums/ProjectUserAccessPrivilege.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * This file is generated by jOOQ. - */ -package edu.uci.ics.texera.dao.jooq.generated.enums; - - -import org.jooq.Catalog; -import org.jooq.EnumType; -import org.jooq.Schema; - - -/** - * This class is generated by jOOQ. - */ -@SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public enum ProjectUserAccessPrivilege implements EnumType { - - NONE("NONE"), - - READ("READ"), - - WRITE("WRITE"); - - private final String literal; - - private ProjectUserAccessPrivilege(String literal) { - this.literal = literal; - } - - @Override - public Catalog getCatalog() { - return null; - } - - @Override - public Schema getSchema() { - return null; - } - - @Override - public String getName() { - return "project_user_access_privilege"; - } - - @Override - public String getLiteral() { - return literal; - } -} diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/enums/UserRole.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/enums/UserRoleEnum.java similarity index 59% rename from core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/enums/UserRole.java rename to core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/enums/UserRoleEnum.java index b171b040320..01663851e9a 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/enums/UserRole.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/enums/UserRoleEnum.java @@ -4,6 +4,8 @@ package edu.uci.ics.texera.dao.jooq.generated.enums; +import edu.uci.ics.texera.dao.jooq.generated.TexeraDb; + import org.jooq.Catalog; import org.jooq.EnumType; import org.jooq.Schema; @@ -13,7 +15,7 @@ * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public enum UserRole implements EnumType { +public enum UserRoleEnum implements EnumType { INACTIVE("INACTIVE"), @@ -25,27 +27,34 @@ public enum UserRole implements EnumType { private final String literal; - private UserRole(String literal) { + private UserRoleEnum(String literal) { this.literal = literal; } @Override public Catalog getCatalog() { - return null; + return getSchema().getCatalog(); } @Override public Schema getSchema() { - return null; + return TexeraDb.TEXERA_DB; } @Override public String getName() { - return "user_role"; + return "user_role_enum"; } @Override public String getLiteral() { return literal; } + + /** + * Lookup a value of this EnumType by its literal + */ + public static UserRoleEnum lookupLiteral(String literal) { + return EnumType.lookupLiteral(UserRoleEnum.class, literal); + } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/Dataset.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/Dataset.java index df1ec6af9ec..c89b70bc7a7 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/Dataset.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/Dataset.java @@ -4,7 +4,6 @@ package edu.uci.ics.texera.dao.jooq.generated.tables; -import edu.uci.ics.texera.dao.jooq.generated.Indexes; import edu.uci.ics.texera.dao.jooq.generated.Keys; import edu.uci.ics.texera.dao.jooq.generated.TexeraDb; import edu.uci.ics.texera.dao.jooq.generated.tables.records.DatasetRecord; @@ -16,17 +15,17 @@ import org.jooq.Field; import org.jooq.ForeignKey; import org.jooq.Identity; -import org.jooq.Index; import org.jooq.Name; import org.jooq.Record; import org.jooq.Row6; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.UniqueKey; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; -import org.jooq.types.UInteger; /** @@ -35,7 +34,7 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class Dataset extends TableImpl { - private static final long serialVersionUID = 1458628918; + private static final long serialVersionUID = 1L; /** * The reference instance of texera_db.dataset @@ -53,38 +52,39 @@ public Class getRecordType() { /** * The column texera_db.dataset.did. */ - public final TableField DID = createField(DSL.name("did"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false).identity(true), this, ""); + public final TableField DID = createField(DSL.name("did"), SQLDataType.INTEGER.nullable(false).identity(true), this, ""); /** * The column texera_db.dataset.owner_uid. */ - public final TableField OWNER_UID = createField(DSL.name("owner_uid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, ""); + public final TableField OWNER_UID = createField(DSL.name("owner_uid"), SQLDataType.INTEGER.nullable(false), this, ""); /** * The column texera_db.dataset.name. */ - public final TableField NAME = createField(DSL.name("name"), org.jooq.impl.SQLDataType.VARCHAR(128).nullable(false), this, ""); + public final TableField NAME = createField(DSL.name("name"), SQLDataType.VARCHAR(128).nullable(false), this, ""); /** * The column texera_db.dataset.is_public. */ - public final TableField IS_PUBLIC = createField(DSL.name("is_public"), org.jooq.impl.SQLDataType.TINYINT.nullable(false).defaultValue(org.jooq.impl.DSL.inline("1", org.jooq.impl.SQLDataType.TINYINT)), this, ""); + public final TableField IS_PUBLIC = createField(DSL.name("is_public"), SQLDataType.BOOLEAN.nullable(false).defaultValue(DSL.field("true", SQLDataType.BOOLEAN)), this, ""); /** * The column texera_db.dataset.description. */ - public final TableField DESCRIPTION = createField(DSL.name("description"), org.jooq.impl.SQLDataType.VARCHAR(512).nullable(false), this, ""); + public final TableField DESCRIPTION = createField(DSL.name("description"), SQLDataType.VARCHAR(512).nullable(false), this, ""); /** * The column texera_db.dataset.creation_time. */ - public final TableField CREATION_TIME = createField(DSL.name("creation_time"), org.jooq.impl.SQLDataType.TIMESTAMP.nullable(false).defaultValue(org.jooq.impl.DSL.field("CURRENT_TIMESTAMP", org.jooq.impl.SQLDataType.TIMESTAMP)), this, ""); + public final TableField CREATION_TIME = createField(DSL.name("creation_time"), SQLDataType.TIMESTAMP(0).nullable(false).defaultValue(DSL.field("CURRENT_TIMESTAMP", SQLDataType.TIMESTAMP)), this, ""); - /** - * Create a texera_db.dataset table reference - */ - public Dataset() { - this(DSL.name("dataset"), null); + private Dataset(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private Dataset(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); } /** @@ -101,12 +101,11 @@ public Dataset(Name alias) { this(alias, DATASET); } - private Dataset(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private Dataset(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a texera_db.dataset table reference + */ + public Dataset() { + this(DSL.name("dataset"), null); } public Dataset(Table child, ForeignKey key) { @@ -115,36 +114,34 @@ public Dataset(Table child, ForeignKey k @Override public Schema getSchema() { - return TexeraDb.TEXERA_DB; - } - - @Override - public List getIndexes() { - return Arrays.asList(Indexes.DATASET_IDX_DATASET_NAME_DESCRIPTION, Indexes.DATASET_OWNER_UID, Indexes.DATASET_PRIMARY); + return aliased() ? null : TexeraDb.TEXERA_DB; } @Override - public Identity getIdentity() { - return Keys.IDENTITY_DATASET; + public Identity getIdentity() { + return (Identity) super.getIdentity(); } @Override public UniqueKey getPrimaryKey() { - return Keys.KEY_DATASET_PRIMARY; - } - - @Override - public List> getKeys() { - return Arrays.>asList(Keys.KEY_DATASET_PRIMARY); + return Keys.DATASET_PKEY; } @Override public List> getReferences() { - return Arrays.>asList(Keys.DATASET_IBFK_1); + return Arrays.asList(Keys.DATASET__DATASET_OWNER_UID_FKEY); } + private transient User _user; + + /** + * Get the implicit join path to the texera_db.user table. + */ public User user() { - return new User(this, Keys.DATASET_IBFK_1); + if (_user == null) + _user = new User(this, Keys.DATASET__DATASET_OWNER_UID_FKEY); + + return _user; } @Override @@ -178,7 +175,7 @@ public Dataset rename(Name name) { // ------------------------------------------------------------------------- @Override - public Row6 fieldsRow() { + public Row6 fieldsRow() { return (Row6) super.fieldsRow(); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/DatasetUserAccess.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/DatasetUserAccess.java index 21f0c20461c..4709b961e25 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/DatasetUserAccess.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/DatasetUserAccess.java @@ -4,10 +4,9 @@ package edu.uci.ics.texera.dao.jooq.generated.tables; -import edu.uci.ics.texera.dao.jooq.generated.Indexes; import edu.uci.ics.texera.dao.jooq.generated.Keys; import edu.uci.ics.texera.dao.jooq.generated.TexeraDb; -import edu.uci.ics.texera.dao.jooq.generated.enums.DatasetUserAccessPrivilege; +import edu.uci.ics.texera.dao.jooq.generated.enums.PrivilegeEnum; import edu.uci.ics.texera.dao.jooq.generated.tables.records.DatasetUserAccessRecord; import java.util.Arrays; @@ -15,17 +14,17 @@ import org.jooq.Field; import org.jooq.ForeignKey; -import org.jooq.Index; import org.jooq.Name; import org.jooq.Record; import org.jooq.Row3; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.UniqueKey; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; -import org.jooq.types.UInteger; /** @@ -34,7 +33,7 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class DatasetUserAccess extends TableImpl { - private static final long serialVersionUID = -1056803018; + private static final long serialVersionUID = 1L; /** * The reference instance of texera_db.dataset_user_access @@ -52,45 +51,47 @@ public Class getRecordType() { /** * The column texera_db.dataset_user_access.did. */ - public final TableField DID = createField(DSL.name("did"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, ""); + public final TableField DID = createField(DSL.name("did"), SQLDataType.INTEGER.nullable(false), this, ""); /** * The column texera_db.dataset_user_access.uid. */ - public final TableField UID = createField(DSL.name("uid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, ""); + public final TableField UID = createField(DSL.name("uid"), SQLDataType.INTEGER.nullable(false), this, ""); /** * The column texera_db.dataset_user_access.privilege. */ - public final TableField PRIVILEGE = createField(DSL.name("privilege"), org.jooq.impl.SQLDataType.VARCHAR(5).nullable(false).defaultValue(org.jooq.impl.DSL.inline("NONE", org.jooq.impl.SQLDataType.VARCHAR)).asEnumDataType(edu.uci.ics.texera.dao.jooq.generated.enums.DatasetUserAccessPrivilege.class), this, ""); + public final TableField PRIVILEGE = createField(DSL.name("privilege"), SQLDataType.VARCHAR.nullable(false).defaultValue(DSL.field("'NONE'::texera_db.privilege_enum", SQLDataType.VARCHAR)).asEnumDataType(edu.uci.ics.texera.dao.jooq.generated.enums.PrivilegeEnum.class), this, ""); - /** - * Create a texera_db.dataset_user_access table reference - */ - public DatasetUserAccess() { - this(DSL.name("dataset_user_access"), null); + private DatasetUserAccess(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private DatasetUserAccess(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); } /** - * Create an aliased texera_db.dataset_user_access table reference + * Create an aliased texera_db.dataset_user_access table + * reference */ public DatasetUserAccess(String alias) { this(DSL.name(alias), DATASET_USER_ACCESS); } /** - * Create an aliased texera_db.dataset_user_access table reference + * Create an aliased texera_db.dataset_user_access table + * reference */ public DatasetUserAccess(Name alias) { this(alias, DATASET_USER_ACCESS); } - private DatasetUserAccess(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private DatasetUserAccess(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a texera_db.dataset_user_access table reference + */ + public DatasetUserAccess() { + this(DSL.name("dataset_user_access"), null); } public DatasetUserAccess(Table child, ForeignKey key) { @@ -99,35 +100,40 @@ public DatasetUserAccess(Table child, ForeignKey getIndexes() { - return Arrays.asList(Indexes.DATASET_USER_ACCESS_PRIMARY, Indexes.DATASET_USER_ACCESS_UID); + return aliased() ? null : TexeraDb.TEXERA_DB; } @Override public UniqueKey getPrimaryKey() { - return Keys.KEY_DATASET_USER_ACCESS_PRIMARY; - } - - @Override - public List> getKeys() { - return Arrays.>asList(Keys.KEY_DATASET_USER_ACCESS_PRIMARY); + return Keys.DATASET_USER_ACCESS_PKEY; } @Override public List> getReferences() { - return Arrays.>asList(Keys.DATASET_USER_ACCESS_IBFK_1, Keys.DATASET_USER_ACCESS_IBFK_2); + return Arrays.asList(Keys.DATASET_USER_ACCESS__DATASET_USER_ACCESS_DID_FKEY, Keys.DATASET_USER_ACCESS__DATASET_USER_ACCESS_UID_FKEY); } + private transient Dataset _dataset; + private transient User _user; + + /** + * Get the implicit join path to the texera_db.dataset table. + */ public Dataset dataset() { - return new Dataset(this, Keys.DATASET_USER_ACCESS_IBFK_1); + if (_dataset == null) + _dataset = new Dataset(this, Keys.DATASET_USER_ACCESS__DATASET_USER_ACCESS_DID_FKEY); + + return _dataset; } + /** + * Get the implicit join path to the texera_db.user table. + */ public User user() { - return new User(this, Keys.DATASET_USER_ACCESS_IBFK_2); + if (_user == null) + _user = new User(this, Keys.DATASET_USER_ACCESS__DATASET_USER_ACCESS_UID_FKEY); + + return _user; } @Override @@ -161,7 +167,7 @@ public DatasetUserAccess rename(Name name) { // ------------------------------------------------------------------------- @Override - public Row3 fieldsRow() { + public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/DatasetUserLikes.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/DatasetUserLikes.java index ec7ef7aa30c..c739293dc8c 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/DatasetUserLikes.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/DatasetUserLikes.java @@ -4,7 +4,6 @@ package edu.uci.ics.texera.dao.jooq.generated.tables; -import edu.uci.ics.texera.dao.jooq.generated.Indexes; import edu.uci.ics.texera.dao.jooq.generated.Keys; import edu.uci.ics.texera.dao.jooq.generated.TexeraDb; import edu.uci.ics.texera.dao.jooq.generated.tables.records.DatasetUserLikesRecord; @@ -14,17 +13,17 @@ import org.jooq.Field; import org.jooq.ForeignKey; -import org.jooq.Index; import org.jooq.Name; import org.jooq.Record; import org.jooq.Row2; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.UniqueKey; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; -import org.jooq.types.UInteger; /** @@ -33,7 +32,7 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class DatasetUserLikes extends TableImpl { - private static final long serialVersionUID = 566607224; + private static final long serialVersionUID = 1L; /** * The reference instance of texera_db.dataset_user_likes @@ -51,40 +50,42 @@ public Class getRecordType() { /** * The column texera_db.dataset_user_likes.uid. */ - public final TableField UID = createField(DSL.name("uid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, ""); + public final TableField UID = createField(DSL.name("uid"), SQLDataType.INTEGER.nullable(false), this, ""); /** * The column texera_db.dataset_user_likes.did. */ - public final TableField DID = createField(DSL.name("did"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, ""); + public final TableField DID = createField(DSL.name("did"), SQLDataType.INTEGER.nullable(false), this, ""); - /** - * Create a texera_db.dataset_user_likes table reference - */ - public DatasetUserLikes() { - this(DSL.name("dataset_user_likes"), null); + private DatasetUserLikes(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private DatasetUserLikes(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); } /** - * Create an aliased texera_db.dataset_user_likes table reference + * Create an aliased texera_db.dataset_user_likes table + * reference */ public DatasetUserLikes(String alias) { this(DSL.name(alias), DATASET_USER_LIKES); } /** - * Create an aliased texera_db.dataset_user_likes table reference + * Create an aliased texera_db.dataset_user_likes table + * reference */ public DatasetUserLikes(Name alias) { this(alias, DATASET_USER_LIKES); } - private DatasetUserLikes(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private DatasetUserLikes(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a texera_db.dataset_user_likes table reference + */ + public DatasetUserLikes() { + this(DSL.name("dataset_user_likes"), null); } public DatasetUserLikes(Table child, ForeignKey key) { @@ -93,35 +94,40 @@ public DatasetUserLikes(Table child, ForeignKey getIndexes() { - return Arrays.asList(Indexes.DATASET_USER_LIKES_DID, Indexes.DATASET_USER_LIKES_PRIMARY); + return aliased() ? null : TexeraDb.TEXERA_DB; } @Override public UniqueKey getPrimaryKey() { - return Keys.KEY_DATASET_USER_LIKES_PRIMARY; - } - - @Override - public List> getKeys() { - return Arrays.>asList(Keys.KEY_DATASET_USER_LIKES_PRIMARY); + return Keys.DATASET_USER_LIKES_PKEY; } @Override public List> getReferences() { - return Arrays.>asList(Keys.DATASET_USER_LIKES_IBFK_1, Keys.DATASET_USER_LIKES_IBFK_2); + return Arrays.asList(Keys.DATASET_USER_LIKES__DATASET_USER_LIKES_UID_FKEY, Keys.DATASET_USER_LIKES__DATASET_USER_LIKES_DID_FKEY); } + private transient User _user; + private transient Dataset _dataset; + + /** + * Get the implicit join path to the texera_db.user table. + */ public User user() { - return new User(this, Keys.DATASET_USER_LIKES_IBFK_1); + if (_user == null) + _user = new User(this, Keys.DATASET_USER_LIKES__DATASET_USER_LIKES_UID_FKEY); + + return _user; } + /** + * Get the implicit join path to the texera_db.dataset table. + */ public Dataset dataset() { - return new Dataset(this, Keys.DATASET_USER_LIKES_IBFK_2); + if (_dataset == null) + _dataset = new Dataset(this, Keys.DATASET_USER_LIKES__DATASET_USER_LIKES_DID_FKEY); + + return _dataset; } @Override @@ -155,7 +161,7 @@ public DatasetUserLikes rename(Name name) { // ------------------------------------------------------------------------- @Override - public Row2 fieldsRow() { + public Row2 fieldsRow() { return (Row2) super.fieldsRow(); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/DatasetVersion.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/DatasetVersion.java index e354990adc6..ac39c527215 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/DatasetVersion.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/DatasetVersion.java @@ -4,7 +4,6 @@ package edu.uci.ics.texera.dao.jooq.generated.tables; -import edu.uci.ics.texera.dao.jooq.generated.Indexes; import edu.uci.ics.texera.dao.jooq.generated.Keys; import edu.uci.ics.texera.dao.jooq.generated.TexeraDb; import edu.uci.ics.texera.dao.jooq.generated.tables.records.DatasetVersionRecord; @@ -16,17 +15,17 @@ import org.jooq.Field; import org.jooq.ForeignKey; import org.jooq.Identity; -import org.jooq.Index; import org.jooq.Name; import org.jooq.Record; import org.jooq.Row6; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.UniqueKey; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; -import org.jooq.types.UInteger; /** @@ -35,7 +34,7 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class DatasetVersion extends TableImpl { - private static final long serialVersionUID = 546683186; + private static final long serialVersionUID = 1L; /** * The reference instance of texera_db.dataset_version @@ -53,38 +52,39 @@ public Class getRecordType() { /** * The column texera_db.dataset_version.dvid. */ - public final TableField DVID = createField(DSL.name("dvid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false).identity(true), this, ""); + public final TableField DVID = createField(DSL.name("dvid"), SQLDataType.INTEGER.nullable(false).identity(true), this, ""); /** * The column texera_db.dataset_version.did. */ - public final TableField DID = createField(DSL.name("did"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, ""); + public final TableField DID = createField(DSL.name("did"), SQLDataType.INTEGER.nullable(false), this, ""); /** * The column texera_db.dataset_version.creator_uid. */ - public final TableField CREATOR_UID = createField(DSL.name("creator_uid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, ""); + public final TableField CREATOR_UID = createField(DSL.name("creator_uid"), SQLDataType.INTEGER.nullable(false), this, ""); /** * The column texera_db.dataset_version.name. */ - public final TableField NAME = createField(DSL.name("name"), org.jooq.impl.SQLDataType.VARCHAR(128).nullable(false), this, ""); + public final TableField NAME = createField(DSL.name("name"), SQLDataType.VARCHAR(128).nullable(false), this, ""); /** * The column texera_db.dataset_version.version_hash. */ - public final TableField VERSION_HASH = createField(DSL.name("version_hash"), org.jooq.impl.SQLDataType.VARCHAR(64).nullable(false), this, ""); + public final TableField VERSION_HASH = createField(DSL.name("version_hash"), SQLDataType.VARCHAR(64).nullable(false), this, ""); /** * The column texera_db.dataset_version.creation_time. */ - public final TableField CREATION_TIME = createField(DSL.name("creation_time"), org.jooq.impl.SQLDataType.TIMESTAMP.nullable(false).defaultValue(org.jooq.impl.DSL.field("CURRENT_TIMESTAMP", org.jooq.impl.SQLDataType.TIMESTAMP)), this, ""); + public final TableField CREATION_TIME = createField(DSL.name("creation_time"), SQLDataType.TIMESTAMP(0).nullable(false).defaultValue(DSL.field("CURRENT_TIMESTAMP", SQLDataType.TIMESTAMP)), this, ""); - /** - * Create a texera_db.dataset_version table reference - */ - public DatasetVersion() { - this(DSL.name("dataset_version"), null); + private DatasetVersion(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private DatasetVersion(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); } /** @@ -101,12 +101,11 @@ public DatasetVersion(Name alias) { this(alias, DATASET_VERSION); } - private DatasetVersion(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private DatasetVersion(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a texera_db.dataset_version table reference + */ + public DatasetVersion() { + this(DSL.name("dataset_version"), null); } public DatasetVersion(Table child, ForeignKey key) { @@ -115,36 +114,34 @@ public DatasetVersion(Table child, ForeignKey getIndexes() { - return Arrays.asList(Indexes.DATASET_VERSION_DID, Indexes.DATASET_VERSION_IDX_DATASET_VERSION_NAME, Indexes.DATASET_VERSION_PRIMARY); + return aliased() ? null : TexeraDb.TEXERA_DB; } @Override - public Identity getIdentity() { - return Keys.IDENTITY_DATASET_VERSION; + public Identity getIdentity() { + return (Identity) super.getIdentity(); } @Override public UniqueKey getPrimaryKey() { - return Keys.KEY_DATASET_VERSION_PRIMARY; - } - - @Override - public List> getKeys() { - return Arrays.>asList(Keys.KEY_DATASET_VERSION_PRIMARY); + return Keys.DATASET_VERSION_PKEY; } @Override public List> getReferences() { - return Arrays.>asList(Keys.DATASET_VERSION_IBFK_1); + return Arrays.asList(Keys.DATASET_VERSION__DATASET_VERSION_DID_FKEY); } + private transient Dataset _dataset; + + /** + * Get the implicit join path to the texera_db.dataset table. + */ public Dataset dataset() { - return new Dataset(this, Keys.DATASET_VERSION_IBFK_1); + if (_dataset == null) + _dataset = new Dataset(this, Keys.DATASET_VERSION__DATASET_VERSION_DID_FKEY); + + return _dataset; } @Override @@ -178,7 +175,7 @@ public DatasetVersion rename(Name name) { // ------------------------------------------------------------------------- @Override - public Row6 fieldsRow() { + public Row6 fieldsRow() { return (Row6) super.fieldsRow(); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/DatasetViewCount.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/DatasetViewCount.java index 60ddcb39e7c..87349be7ea7 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/DatasetViewCount.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/DatasetViewCount.java @@ -4,7 +4,6 @@ package edu.uci.ics.texera.dao.jooq.generated.tables; -import edu.uci.ics.texera.dao.jooq.generated.Indexes; import edu.uci.ics.texera.dao.jooq.generated.Keys; import edu.uci.ics.texera.dao.jooq.generated.TexeraDb; import edu.uci.ics.texera.dao.jooq.generated.tables.records.DatasetViewCountRecord; @@ -14,17 +13,17 @@ import org.jooq.Field; import org.jooq.ForeignKey; -import org.jooq.Index; import org.jooq.Name; import org.jooq.Record; import org.jooq.Row2; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.UniqueKey; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; -import org.jooq.types.UInteger; /** @@ -33,7 +32,7 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class DatasetViewCount extends TableImpl { - private static final long serialVersionUID = 2087672115; + private static final long serialVersionUID = 1L; /** * The reference instance of texera_db.dataset_view_count @@ -51,40 +50,42 @@ public Class getRecordType() { /** * The column texera_db.dataset_view_count.did. */ - public final TableField DID = createField(DSL.name("did"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, ""); + public final TableField DID = createField(DSL.name("did"), SQLDataType.INTEGER.nullable(false), this, ""); /** * The column texera_db.dataset_view_count.view_count. */ - public final TableField VIEW_COUNT = createField(DSL.name("view_count"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false).defaultValue(org.jooq.impl.DSL.inline("0", org.jooq.impl.SQLDataType.INTEGERUNSIGNED)), this, ""); + public final TableField VIEW_COUNT = createField(DSL.name("view_count"), SQLDataType.INTEGER.nullable(false).defaultValue(DSL.field("0", SQLDataType.INTEGER)), this, ""); - /** - * Create a texera_db.dataset_view_count table reference - */ - public DatasetViewCount() { - this(DSL.name("dataset_view_count"), null); + private DatasetViewCount(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private DatasetViewCount(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); } /** - * Create an aliased texera_db.dataset_view_count table reference + * Create an aliased texera_db.dataset_view_count table + * reference */ public DatasetViewCount(String alias) { this(DSL.name(alias), DATASET_VIEW_COUNT); } /** - * Create an aliased texera_db.dataset_view_count table reference + * Create an aliased texera_db.dataset_view_count table + * reference */ public DatasetViewCount(Name alias) { this(alias, DATASET_VIEW_COUNT); } - private DatasetViewCount(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private DatasetViewCount(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a texera_db.dataset_view_count table reference + */ + public DatasetViewCount() { + this(DSL.name("dataset_view_count"), null); } public DatasetViewCount(Table child, ForeignKey key) { @@ -93,31 +94,29 @@ public DatasetViewCount(Table child, ForeignKey getIndexes() { - return Arrays.asList(Indexes.DATASET_VIEW_COUNT_PRIMARY); + return aliased() ? null : TexeraDb.TEXERA_DB; } @Override public UniqueKey getPrimaryKey() { - return Keys.KEY_DATASET_VIEW_COUNT_PRIMARY; - } - - @Override - public List> getKeys() { - return Arrays.>asList(Keys.KEY_DATASET_VIEW_COUNT_PRIMARY); + return Keys.DATASET_VIEW_COUNT_PKEY; } @Override public List> getReferences() { - return Arrays.>asList(Keys.DATASET_VIEW_COUNT_IBFK_1); + return Arrays.asList(Keys.DATASET_VIEW_COUNT__DATASET_VIEW_COUNT_DID_FKEY); } + private transient Dataset _dataset; + + /** + * Get the implicit join path to the texera_db.dataset table. + */ public Dataset dataset() { - return new Dataset(this, Keys.DATASET_VIEW_COUNT_IBFK_1); + if (_dataset == null) + _dataset = new Dataset(this, Keys.DATASET_VIEW_COUNT__DATASET_VIEW_COUNT_DID_FKEY); + + return _dataset; } @Override @@ -151,7 +150,7 @@ public DatasetViewCount rename(Name name) { // ------------------------------------------------------------------------- @Override - public Row2 fieldsRow() { + public Row2 fieldsRow() { return (Row2) super.fieldsRow(); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/OperatorExecutions.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/OperatorExecutions.java index ea1c35c9c62..42057dc59a9 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/OperatorExecutions.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/OperatorExecutions.java @@ -4,7 +4,6 @@ package edu.uci.ics.texera.dao.jooq.generated.tables; -import edu.uci.ics.texera.dao.jooq.generated.Indexes; import edu.uci.ics.texera.dao.jooq.generated.Keys; import edu.uci.ics.texera.dao.jooq.generated.TexeraDb; import edu.uci.ics.texera.dao.jooq.generated.tables.records.OperatorExecutionsRecord; @@ -14,17 +13,17 @@ import org.jooq.Field; import org.jooq.ForeignKey; -import org.jooq.Index; import org.jooq.Name; import org.jooq.Record; import org.jooq.Row3; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.UniqueKey; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; -import org.jooq.types.UInteger; /** @@ -33,7 +32,7 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class OperatorExecutions extends TableImpl { - private static final long serialVersionUID = -1617835207; + private static final long serialVersionUID = 1L; /** * The reference instance of texera_db.operator_executions @@ -49,47 +48,51 @@ public Class getRecordType() { } /** - * The column texera_db.operator_executions.workflow_execution_id. + * The column + * texera_db.operator_executions.workflow_execution_id. */ - public final TableField WORKFLOW_EXECUTION_ID = createField(DSL.name("workflow_execution_id"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, ""); + public final TableField WORKFLOW_EXECUTION_ID = createField(DSL.name("workflow_execution_id"), SQLDataType.INTEGER.nullable(false), this, ""); /** * The column texera_db.operator_executions.operator_id. */ - public final TableField OPERATOR_ID = createField(DSL.name("operator_id"), org.jooq.impl.SQLDataType.VARCHAR(100).nullable(false), this, ""); + public final TableField OPERATOR_ID = createField(DSL.name("operator_id"), SQLDataType.VARCHAR(100).nullable(false), this, ""); /** - * The column texera_db.operator_executions.console_messages_uri. + * The column + * texera_db.operator_executions.console_messages_uri. */ - public final TableField CONSOLE_MESSAGES_URI = createField(DSL.name("console_messages_uri"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField CONSOLE_MESSAGES_URI = createField(DSL.name("console_messages_uri"), SQLDataType.CLOB, this, ""); - /** - * Create a texera_db.operator_executions table reference - */ - public OperatorExecutions() { - this(DSL.name("operator_executions"), null); + private OperatorExecutions(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private OperatorExecutions(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); } /** - * Create an aliased texera_db.operator_executions table reference + * Create an aliased texera_db.operator_executions table + * reference */ public OperatorExecutions(String alias) { this(DSL.name(alias), OPERATOR_EXECUTIONS); } /** - * Create an aliased texera_db.operator_executions table reference + * Create an aliased texera_db.operator_executions table + * reference */ public OperatorExecutions(Name alias) { this(alias, OPERATOR_EXECUTIONS); } - private OperatorExecutions(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private OperatorExecutions(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a texera_db.operator_executions table reference + */ + public OperatorExecutions() { + this(DSL.name("operator_executions"), null); } public OperatorExecutions(Table child, ForeignKey key) { @@ -98,26 +101,30 @@ public OperatorExecutions(Table child, ForeignKey getIndexes() { - return Arrays.asList(Indexes.OPERATOR_EXECUTIONS_WORKFLOW_EXECUTION_ID); - } - - @Override - public List> getKeys() { - return Arrays.>asList(Keys.KEY_OPERATOR_EXECUTIONS_WORKFLOW_EXECUTION_ID); + public UniqueKey getPrimaryKey() { + return Keys.OPERATOR_EXECUTIONS_PKEY; } @Override public List> getReferences() { - return Arrays.>asList(Keys.OPERATOR_EXECUTIONS_IBFK_1); + return Arrays.asList(Keys.OPERATOR_EXECUTIONS__OPERATOR_EXECUTIONS_WORKFLOW_EXECUTION_ID_FKEY); } + private transient WorkflowExecutions _workflowExecutions; + + /** + * Get the implicit join path to the + * texera_db.workflow_executions table. + */ public WorkflowExecutions workflowExecutions() { - return new WorkflowExecutions(this, Keys.OPERATOR_EXECUTIONS_IBFK_1); + if (_workflowExecutions == null) + _workflowExecutions = new WorkflowExecutions(this, Keys.OPERATOR_EXECUTIONS__OPERATOR_EXECUTIONS_WORKFLOW_EXECUTION_ID_FKEY); + + return _workflowExecutions; } @Override @@ -151,7 +158,7 @@ public OperatorExecutions rename(Name name) { // ------------------------------------------------------------------------- @Override - public Row3 fieldsRow() { + public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/OperatorPortExecutions.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/OperatorPortExecutions.java index 1566696b11d..a8731e1caf2 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/OperatorPortExecutions.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/OperatorPortExecutions.java @@ -4,7 +4,6 @@ package edu.uci.ics.texera.dao.jooq.generated.tables; -import edu.uci.ics.texera.dao.jooq.generated.Indexes; import edu.uci.ics.texera.dao.jooq.generated.Keys; import edu.uci.ics.texera.dao.jooq.generated.TexeraDb; import edu.uci.ics.texera.dao.jooq.generated.tables.records.OperatorPortExecutionsRecord; @@ -14,17 +13,17 @@ import org.jooq.Field; import org.jooq.ForeignKey; -import org.jooq.Index; import org.jooq.Name; import org.jooq.Record; import org.jooq.Row4; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.UniqueKey; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; -import org.jooq.types.UInteger; /** @@ -33,7 +32,7 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class OperatorPortExecutions extends TableImpl { - private static final long serialVersionUID = -1510415698; + private static final long serialVersionUID = 1L; /** * The reference instance of texera_db.operator_port_executions @@ -49,52 +48,55 @@ public Class getRecordType() { } /** - * The column texera_db.operator_port_executions.workflow_execution_id. + * The column + * texera_db.operator_port_executions.workflow_execution_id. */ - public final TableField WORKFLOW_EXECUTION_ID = createField(DSL.name("workflow_execution_id"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, ""); + public final TableField WORKFLOW_EXECUTION_ID = createField(DSL.name("workflow_execution_id"), SQLDataType.INTEGER.nullable(false), this, ""); /** * The column texera_db.operator_port_executions.operator_id. */ - public final TableField OPERATOR_ID = createField(DSL.name("operator_id"), org.jooq.impl.SQLDataType.VARCHAR(100).nullable(false), this, ""); + public final TableField OPERATOR_ID = createField(DSL.name("operator_id"), SQLDataType.VARCHAR(100).nullable(false), this, ""); /** * The column texera_db.operator_port_executions.port_id. */ - public final TableField PORT_ID = createField(DSL.name("port_id"), org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, ""); + public final TableField PORT_ID = createField(DSL.name("port_id"), SQLDataType.INTEGER.nullable(false), this, ""); /** * The column texera_db.operator_port_executions.result_uri. */ - public final TableField RESULT_URI = createField(DSL.name("result_uri"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField RESULT_URI = createField(DSL.name("result_uri"), SQLDataType.CLOB, this, ""); - /** - * Create a texera_db.operator_port_executions table reference - */ - public OperatorPortExecutions() { - this(DSL.name("operator_port_executions"), null); + private OperatorPortExecutions(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private OperatorPortExecutions(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); } /** - * Create an aliased texera_db.operator_port_executions table reference + * Create an aliased texera_db.operator_port_executions table + * reference */ public OperatorPortExecutions(String alias) { this(DSL.name(alias), OPERATOR_PORT_EXECUTIONS); } /** - * Create an aliased texera_db.operator_port_executions table reference + * Create an aliased texera_db.operator_port_executions table + * reference */ public OperatorPortExecutions(Name alias) { this(alias, OPERATOR_PORT_EXECUTIONS); } - private OperatorPortExecutions(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private OperatorPortExecutions(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a texera_db.operator_port_executions table reference + */ + public OperatorPortExecutions() { + this(DSL.name("operator_port_executions"), null); } public OperatorPortExecutions(Table child, ForeignKey key) { @@ -103,26 +105,30 @@ public OperatorPortExecutions(Table child, ForeignKey getIndexes() { - return Arrays.asList(Indexes.OPERATOR_PORT_EXECUTIONS_WORKFLOW_EXECUTION_ID); - } - - @Override - public List> getKeys() { - return Arrays.>asList(Keys.KEY_OPERATOR_PORT_EXECUTIONS_WORKFLOW_EXECUTION_ID); + public UniqueKey getPrimaryKey() { + return Keys.OPERATOR_PORT_EXECUTIONS_PKEY; } @Override public List> getReferences() { - return Arrays.>asList(Keys.OPERATOR_PORT_EXECUTIONS_IBFK_1); + return Arrays.asList(Keys.OPERATOR_PORT_EXECUTIONS__OPERATOR_PORT_EXECUTIONS_WORKFLOW_EXECUTION_ID_FKEY); } + private transient WorkflowExecutions _workflowExecutions; + + /** + * Get the implicit join path to the + * texera_db.workflow_executions table. + */ public WorkflowExecutions workflowExecutions() { - return new WorkflowExecutions(this, Keys.OPERATOR_PORT_EXECUTIONS_IBFK_1); + if (_workflowExecutions == null) + _workflowExecutions = new WorkflowExecutions(this, Keys.OPERATOR_PORT_EXECUTIONS__OPERATOR_PORT_EXECUTIONS_WORKFLOW_EXECUTION_ID_FKEY); + + return _workflowExecutions; } @Override @@ -156,7 +162,7 @@ public OperatorPortExecutions rename(Name name) { // ------------------------------------------------------------------------- @Override - public Row4 fieldsRow() { + public Row4 fieldsRow() { return (Row4) super.fieldsRow(); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/Project.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/Project.java index 15b61d5da07..42fe516fd69 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/Project.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/Project.java @@ -4,7 +4,6 @@ package edu.uci.ics.texera.dao.jooq.generated.tables; -import edu.uci.ics.texera.dao.jooq.generated.Indexes; import edu.uci.ics.texera.dao.jooq.generated.Keys; import edu.uci.ics.texera.dao.jooq.generated.TexeraDb; import edu.uci.ics.texera.dao.jooq.generated.tables.records.ProjectRecord; @@ -16,17 +15,17 @@ import org.jooq.Field; import org.jooq.ForeignKey; import org.jooq.Identity; -import org.jooq.Index; import org.jooq.Name; import org.jooq.Record; import org.jooq.Row6; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.UniqueKey; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; -import org.jooq.types.UInteger; /** @@ -35,7 +34,7 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class Project extends TableImpl { - private static final long serialVersionUID = 586105130; + private static final long serialVersionUID = 1L; /** * The reference instance of texera_db.project @@ -53,38 +52,39 @@ public Class getRecordType() { /** * The column texera_db.project.pid. */ - public final TableField PID = createField(DSL.name("pid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false).identity(true), this, ""); + public final TableField PID = createField(DSL.name("pid"), SQLDataType.INTEGER.nullable(false).identity(true), this, ""); /** * The column texera_db.project.name. */ - public final TableField NAME = createField(DSL.name("name"), org.jooq.impl.SQLDataType.VARCHAR(128).nullable(false), this, ""); + public final TableField NAME = createField(DSL.name("name"), SQLDataType.VARCHAR(128).nullable(false), this, ""); /** * The column texera_db.project.description. */ - public final TableField DESCRIPTION = createField(DSL.name("description"), org.jooq.impl.SQLDataType.VARCHAR(10000), this, ""); + public final TableField DESCRIPTION = createField(DSL.name("description"), SQLDataType.VARCHAR(10000), this, ""); /** * The column texera_db.project.owner_id. */ - public final TableField OWNER_ID = createField(DSL.name("owner_id"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, ""); + public final TableField OWNER_ID = createField(DSL.name("owner_id"), SQLDataType.INTEGER.nullable(false), this, ""); /** * The column texera_db.project.creation_time. */ - public final TableField CREATION_TIME = createField(DSL.name("creation_time"), org.jooq.impl.SQLDataType.TIMESTAMP.nullable(false).defaultValue(org.jooq.impl.DSL.field("CURRENT_TIMESTAMP", org.jooq.impl.SQLDataType.TIMESTAMP)), this, ""); + public final TableField CREATION_TIME = createField(DSL.name("creation_time"), SQLDataType.TIMESTAMP(0).nullable(false).defaultValue(DSL.field("CURRENT_TIMESTAMP", SQLDataType.TIMESTAMP)), this, ""); /** * The column texera_db.project.color. */ - public final TableField COLOR = createField(DSL.name("color"), org.jooq.impl.SQLDataType.VARCHAR(6), this, ""); + public final TableField COLOR = createField(DSL.name("color"), SQLDataType.VARCHAR(6), this, ""); - /** - * Create a texera_db.project table reference - */ - public Project() { - this(DSL.name("project"), null); + private Project(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private Project(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); } /** @@ -101,12 +101,11 @@ public Project(Name alias) { this(alias, PROJECT); } - private Project(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private Project(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a texera_db.project table reference + */ + public Project() { + this(DSL.name("project"), null); } public Project(Table child, ForeignKey key) { @@ -115,36 +114,39 @@ public Project(Table child, ForeignKey k @Override public Schema getSchema() { - return TexeraDb.TEXERA_DB; + return aliased() ? null : TexeraDb.TEXERA_DB; } @Override - public List getIndexes() { - return Arrays.asList(Indexes.PROJECT_IDX_USER_PROJECT_NAME_DESCRIPTION, Indexes.PROJECT_OWNER_ID, Indexes.PROJECT_PRIMARY); - } - - @Override - public Identity getIdentity() { - return Keys.IDENTITY_PROJECT; + public Identity getIdentity() { + return (Identity) super.getIdentity(); } @Override public UniqueKey getPrimaryKey() { - return Keys.KEY_PROJECT_PRIMARY; + return Keys.PROJECT_PKEY; } @Override - public List> getKeys() { - return Arrays.>asList(Keys.KEY_PROJECT_PRIMARY, Keys.KEY_PROJECT_OWNER_ID); + public List> getUniqueKeys() { + return Arrays.asList(Keys.PROJECT_OWNER_ID_NAME_KEY); } @Override public List> getReferences() { - return Arrays.>asList(Keys.PROJECT_IBFK_1); + return Arrays.asList(Keys.PROJECT__PROJECT_OWNER_ID_FKEY); } + private transient User _user; + + /** + * Get the implicit join path to the texera_db.user table. + */ public User user() { - return new User(this, Keys.PROJECT_IBFK_1); + if (_user == null) + _user = new User(this, Keys.PROJECT__PROJECT_OWNER_ID_FKEY); + + return _user; } @Override @@ -178,7 +180,7 @@ public Project rename(Name name) { // ------------------------------------------------------------------------- @Override - public Row6 fieldsRow() { + public Row6 fieldsRow() { return (Row6) super.fieldsRow(); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/ProjectUserAccess.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/ProjectUserAccess.java index df930ea1982..123107ec068 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/ProjectUserAccess.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/ProjectUserAccess.java @@ -4,10 +4,9 @@ package edu.uci.ics.texera.dao.jooq.generated.tables; -import edu.uci.ics.texera.dao.jooq.generated.Indexes; import edu.uci.ics.texera.dao.jooq.generated.Keys; import edu.uci.ics.texera.dao.jooq.generated.TexeraDb; -import edu.uci.ics.texera.dao.jooq.generated.enums.ProjectUserAccessPrivilege; +import edu.uci.ics.texera.dao.jooq.generated.enums.PrivilegeEnum; import edu.uci.ics.texera.dao.jooq.generated.tables.records.ProjectUserAccessRecord; import java.util.Arrays; @@ -15,17 +14,17 @@ import org.jooq.Field; import org.jooq.ForeignKey; -import org.jooq.Index; import org.jooq.Name; import org.jooq.Record; import org.jooq.Row3; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.UniqueKey; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; -import org.jooq.types.UInteger; /** @@ -34,7 +33,7 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class ProjectUserAccess extends TableImpl { - private static final long serialVersionUID = 1043932682; + private static final long serialVersionUID = 1L; /** * The reference instance of texera_db.project_user_access @@ -52,45 +51,47 @@ public Class getRecordType() { /** * The column texera_db.project_user_access.uid. */ - public final TableField UID = createField(DSL.name("uid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, ""); + public final TableField UID = createField(DSL.name("uid"), SQLDataType.INTEGER.nullable(false), this, ""); /** * The column texera_db.project_user_access.pid. */ - public final TableField PID = createField(DSL.name("pid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, ""); + public final TableField PID = createField(DSL.name("pid"), SQLDataType.INTEGER.nullable(false), this, ""); /** * The column texera_db.project_user_access.privilege. */ - public final TableField PRIVILEGE = createField(DSL.name("privilege"), org.jooq.impl.SQLDataType.VARCHAR(5).nullable(false).defaultValue(org.jooq.impl.DSL.inline("NONE", org.jooq.impl.SQLDataType.VARCHAR)).asEnumDataType(edu.uci.ics.texera.dao.jooq.generated.enums.ProjectUserAccessPrivilege.class), this, ""); + public final TableField PRIVILEGE = createField(DSL.name("privilege"), SQLDataType.VARCHAR.nullable(false).defaultValue(DSL.field("'NONE'::texera_db.privilege_enum", SQLDataType.VARCHAR)).asEnumDataType(edu.uci.ics.texera.dao.jooq.generated.enums.PrivilegeEnum.class), this, ""); - /** - * Create a texera_db.project_user_access table reference - */ - public ProjectUserAccess() { - this(DSL.name("project_user_access"), null); + private ProjectUserAccess(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private ProjectUserAccess(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); } /** - * Create an aliased texera_db.project_user_access table reference + * Create an aliased texera_db.project_user_access table + * reference */ public ProjectUserAccess(String alias) { this(DSL.name(alias), PROJECT_USER_ACCESS); } /** - * Create an aliased texera_db.project_user_access table reference + * Create an aliased texera_db.project_user_access table + * reference */ public ProjectUserAccess(Name alias) { this(alias, PROJECT_USER_ACCESS); } - private ProjectUserAccess(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private ProjectUserAccess(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a texera_db.project_user_access table reference + */ + public ProjectUserAccess() { + this(DSL.name("project_user_access"), null); } public ProjectUserAccess(Table child, ForeignKey key) { @@ -99,35 +100,40 @@ public ProjectUserAccess(Table child, ForeignKey getIndexes() { - return Arrays.asList(Indexes.PROJECT_USER_ACCESS_PID, Indexes.PROJECT_USER_ACCESS_PRIMARY); + return aliased() ? null : TexeraDb.TEXERA_DB; } @Override public UniqueKey getPrimaryKey() { - return Keys.KEY_PROJECT_USER_ACCESS_PRIMARY; - } - - @Override - public List> getKeys() { - return Arrays.>asList(Keys.KEY_PROJECT_USER_ACCESS_PRIMARY); + return Keys.PROJECT_USER_ACCESS_PKEY; } @Override public List> getReferences() { - return Arrays.>asList(Keys.PROJECT_USER_ACCESS_IBFK_1, Keys.PROJECT_USER_ACCESS_IBFK_2); + return Arrays.asList(Keys.PROJECT_USER_ACCESS__PROJECT_USER_ACCESS_UID_FKEY, Keys.PROJECT_USER_ACCESS__PROJECT_USER_ACCESS_PID_FKEY); } + private transient User _user; + private transient Project _project; + + /** + * Get the implicit join path to the texera_db.user table. + */ public User user() { - return new User(this, Keys.PROJECT_USER_ACCESS_IBFK_1); + if (_user == null) + _user = new User(this, Keys.PROJECT_USER_ACCESS__PROJECT_USER_ACCESS_UID_FKEY); + + return _user; } + /** + * Get the implicit join path to the texera_db.project table. + */ public Project project() { - return new Project(this, Keys.PROJECT_USER_ACCESS_IBFK_2); + if (_project == null) + _project = new Project(this, Keys.PROJECT_USER_ACCESS__PROJECT_USER_ACCESS_PID_FKEY); + + return _project; } @Override @@ -161,7 +167,7 @@ public ProjectUserAccess rename(Name name) { // ------------------------------------------------------------------------- @Override - public Row3 fieldsRow() { + public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/PublicProject.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/PublicProject.java index 91eb9e5d10e..3abb1398191 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/PublicProject.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/PublicProject.java @@ -4,7 +4,6 @@ package edu.uci.ics.texera.dao.jooq.generated.tables; -import edu.uci.ics.texera.dao.jooq.generated.Indexes; import edu.uci.ics.texera.dao.jooq.generated.Keys; import edu.uci.ics.texera.dao.jooq.generated.TexeraDb; import edu.uci.ics.texera.dao.jooq.generated.tables.records.PublicProjectRecord; @@ -14,17 +13,17 @@ import org.jooq.Field; import org.jooq.ForeignKey; -import org.jooq.Index; import org.jooq.Name; import org.jooq.Record; import org.jooq.Row2; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.UniqueKey; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; -import org.jooq.types.UInteger; /** @@ -33,7 +32,7 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class PublicProject extends TableImpl { - private static final long serialVersionUID = -1376825429; + private static final long serialVersionUID = 1L; /** * The reference instance of texera_db.public_project @@ -51,18 +50,19 @@ public Class getRecordType() { /** * The column texera_db.public_project.pid. */ - public final TableField PID = createField(DSL.name("pid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, ""); + public final TableField PID = createField(DSL.name("pid"), SQLDataType.INTEGER.nullable(false), this, ""); /** * The column texera_db.public_project.uid. */ - public final TableField UID = createField(DSL.name("uid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED, this, ""); + public final TableField UID = createField(DSL.name("uid"), SQLDataType.INTEGER, this, ""); - /** - * Create a texera_db.public_project table reference - */ - public PublicProject() { - this(DSL.name("public_project"), null); + private PublicProject(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private PublicProject(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); } /** @@ -79,12 +79,11 @@ public PublicProject(Name alias) { this(alias, PUBLIC_PROJECT); } - private PublicProject(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private PublicProject(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a texera_db.public_project table reference + */ + public PublicProject() { + this(DSL.name("public_project"), null); } public PublicProject(Table child, ForeignKey key) { @@ -93,31 +92,29 @@ public PublicProject(Table child, ForeignKey getIndexes() { - return Arrays.asList(Indexes.PUBLIC_PROJECT_PRIMARY); + return aliased() ? null : TexeraDb.TEXERA_DB; } @Override public UniqueKey getPrimaryKey() { - return Keys.KEY_PUBLIC_PROJECT_PRIMARY; - } - - @Override - public List> getKeys() { - return Arrays.>asList(Keys.KEY_PUBLIC_PROJECT_PRIMARY); + return Keys.PUBLIC_PROJECT_PKEY; } @Override public List> getReferences() { - return Arrays.>asList(Keys.PUBLIC_PROJECT_IBFK_1); + return Arrays.asList(Keys.PUBLIC_PROJECT__PUBLIC_PROJECT_PID_FKEY); } + private transient Project _project; + + /** + * Get the implicit join path to the texera_db.project table. + */ public Project project() { - return new Project(this, Keys.PUBLIC_PROJECT_IBFK_1); + if (_project == null) + _project = new Project(this, Keys.PUBLIC_PROJECT__PUBLIC_PROJECT_PID_FKEY); + + return _project; } @Override @@ -151,7 +148,7 @@ public PublicProject rename(Name name) { // ------------------------------------------------------------------------- @Override - public Row2 fieldsRow() { + public Row2 fieldsRow() { return (Row2) super.fieldsRow(); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/User.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/User.java index f750cadb718..1a534885186 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/User.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/User.java @@ -4,29 +4,30 @@ package edu.uci.ics.texera.dao.jooq.generated.tables; -import edu.uci.ics.texera.dao.jooq.generated.Indexes; import edu.uci.ics.texera.dao.jooq.generated.Keys; import edu.uci.ics.texera.dao.jooq.generated.TexeraDb; -import edu.uci.ics.texera.dao.jooq.generated.enums.UserRole; +import edu.uci.ics.texera.dao.jooq.generated.enums.UserRoleEnum; import edu.uci.ics.texera.dao.jooq.generated.tables.records.UserRecord; import java.util.Arrays; import java.util.List; +import org.jooq.Check; import org.jooq.Field; import org.jooq.ForeignKey; import org.jooq.Identity; -import org.jooq.Index; import org.jooq.Name; import org.jooq.Record; import org.jooq.Row7; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.UniqueKey; import org.jooq.impl.DSL; +import org.jooq.impl.Internal; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; -import org.jooq.types.UInteger; /** @@ -35,7 +36,7 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class User extends TableImpl { - private static final long serialVersionUID = 1447964225; + private static final long serialVersionUID = 1L; /** * The reference instance of texera_db.user @@ -53,43 +54,44 @@ public Class getRecordType() { /** * The column texera_db.user.uid. */ - public final TableField UID = createField(DSL.name("uid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false).identity(true), this, ""); + public final TableField UID = createField(DSL.name("uid"), SQLDataType.INTEGER.nullable(false).identity(true), this, ""); /** * The column texera_db.user.name. */ - public final TableField NAME = createField(DSL.name("name"), org.jooq.impl.SQLDataType.VARCHAR(256).nullable(false), this, ""); + public final TableField NAME = createField(DSL.name("name"), SQLDataType.VARCHAR(256).nullable(false), this, ""); /** * The column texera_db.user.email. */ - public final TableField EMAIL = createField(DSL.name("email"), org.jooq.impl.SQLDataType.VARCHAR(256), this, ""); + public final TableField EMAIL = createField(DSL.name("email"), SQLDataType.VARCHAR(256), this, ""); /** * The column texera_db.user.password. */ - public final TableField PASSWORD = createField(DSL.name("password"), org.jooq.impl.SQLDataType.VARCHAR(256), this, ""); + public final TableField PASSWORD = createField(DSL.name("password"), SQLDataType.VARCHAR(256), this, ""); /** * The column texera_db.user.google_id. */ - public final TableField GOOGLE_ID = createField(DSL.name("google_id"), org.jooq.impl.SQLDataType.VARCHAR(256), this, ""); - - /** - * The column texera_db.user.role. - */ - public final TableField ROLE = createField(DSL.name("role"), org.jooq.impl.SQLDataType.VARCHAR(10).nullable(false).defaultValue(org.jooq.impl.DSL.inline("INACTIVE", org.jooq.impl.SQLDataType.VARCHAR)).asEnumDataType(edu.uci.ics.texera.dao.jooq.generated.enums.UserRole.class), this, ""); + public final TableField GOOGLE_ID = createField(DSL.name("google_id"), SQLDataType.VARCHAR(256), this, ""); /** * The column texera_db.user.google_avatar. */ - public final TableField GOOGLE_AVATAR = createField(DSL.name("google_avatar"), org.jooq.impl.SQLDataType.VARCHAR(100), this, ""); + public final TableField GOOGLE_AVATAR = createField(DSL.name("google_avatar"), SQLDataType.VARCHAR(100), this, ""); /** - * Create a texera_db.user table reference + * The column texera_db.user.role. */ - public User() { - this(DSL.name("user"), null); + public final TableField ROLE = createField(DSL.name("role"), SQLDataType.VARCHAR.nullable(false).defaultValue(DSL.field("'INACTIVE'::texera_db.user_role_enum", SQLDataType.VARCHAR)).asEnumDataType(edu.uci.ics.texera.dao.jooq.generated.enums.UserRoleEnum.class), this, ""); + + private User(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private User(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); } /** @@ -106,12 +108,11 @@ public User(Name alias) { this(alias, USER); } - private User(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private User(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a texera_db.user table reference + */ + public User() { + this(DSL.name("user"), null); } public User(Table child, ForeignKey key) { @@ -120,27 +121,29 @@ public User(Table child, ForeignKey key) { @Override public Schema getSchema() { - return TexeraDb.TEXERA_DB; + return aliased() ? null : TexeraDb.TEXERA_DB; } @Override - public List getIndexes() { - return Arrays.asList(Indexes.USER_EMAIL, Indexes.USER_GOOGLE_ID, Indexes.USER_IDX_USER_NAME, Indexes.USER_PRIMARY); + public Identity getIdentity() { + return (Identity) super.getIdentity(); } @Override - public Identity getIdentity() { - return Keys.IDENTITY_USER; + public UniqueKey getPrimaryKey() { + return Keys.USER_PKEY; } @Override - public UniqueKey getPrimaryKey() { - return Keys.KEY_USER_PRIMARY; + public List> getUniqueKeys() { + return Arrays.asList(Keys.USER_EMAIL_KEY, Keys.USER_GOOGLE_ID_KEY); } @Override - public List> getKeys() { - return Arrays.>asList(Keys.KEY_USER_PRIMARY, Keys.KEY_USER_EMAIL, Keys.KEY_USER_GOOGLE_ID); + public List> getChecks() { + return Arrays.asList( + Internal.createCheck(this, DSL.name("ck_nulltest"), "(((password IS NOT NULL) OR (google_id IS NOT NULL)))", true) + ); } @Override @@ -174,7 +177,7 @@ public User rename(Name name) { // ------------------------------------------------------------------------- @Override - public Row7 fieldsRow() { + public Row7 fieldsRow() { return (Row7) super.fieldsRow(); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/UserActivity.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/UserActivity.java index 3e2f18c29d7..1ca03175659 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/UserActivity.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/UserActivity.java @@ -17,9 +17,10 @@ import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; -import org.jooq.types.UInteger; /** @@ -28,7 +29,7 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class UserActivity extends TableImpl { - private static final long serialVersionUID = -891466166; + private static final long serialVersionUID = 1L; /** * The reference instance of texera_db.user_activity @@ -46,38 +47,39 @@ public Class getRecordType() { /** * The column texera_db.user_activity.uid. */ - public final TableField UID = createField(DSL.name("uid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false).defaultValue(org.jooq.impl.DSL.inline("0", org.jooq.impl.SQLDataType.INTEGERUNSIGNED)), this, ""); + public final TableField UID = createField(DSL.name("uid"), SQLDataType.INTEGER.nullable(false).defaultValue(DSL.field("0", SQLDataType.INTEGER)), this, ""); /** * The column texera_db.user_activity.id. */ - public final TableField ID = createField(DSL.name("id"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, ""); + public final TableField ID = createField(DSL.name("id"), SQLDataType.INTEGER.nullable(false), this, ""); /** * The column texera_db.user_activity.type. */ - public final TableField TYPE = createField(DSL.name("type"), org.jooq.impl.SQLDataType.VARCHAR(15).nullable(false), this, ""); + public final TableField TYPE = createField(DSL.name("type"), SQLDataType.VARCHAR(15).nullable(false), this, ""); /** * The column texera_db.user_activity.ip. */ - public final TableField IP = createField(DSL.name("ip"), org.jooq.impl.SQLDataType.VARCHAR(15), this, ""); + public final TableField IP = createField(DSL.name("ip"), SQLDataType.VARCHAR(15).defaultValue(DSL.field("NULL::character varying", SQLDataType.VARCHAR)), this, ""); /** * The column texera_db.user_activity.activate. */ - public final TableField ACTIVATE = createField(DSL.name("activate"), org.jooq.impl.SQLDataType.VARCHAR(10).nullable(false), this, ""); + public final TableField ACTIVATE = createField(DSL.name("activate"), SQLDataType.VARCHAR(10).nullable(false), this, ""); /** * The column texera_db.user_activity.activity_time. */ - public final TableField ACTIVITY_TIME = createField(DSL.name("activity_time"), org.jooq.impl.SQLDataType.TIMESTAMP.defaultValue(org.jooq.impl.DSL.field("CURRENT_TIMESTAMP", org.jooq.impl.SQLDataType.TIMESTAMP)), this, ""); + public final TableField ACTIVITY_TIME = createField(DSL.name("activity_time"), SQLDataType.TIMESTAMP(0).defaultValue(DSL.field("CURRENT_TIMESTAMP", SQLDataType.TIMESTAMP)), this, ""); - /** - * Create a texera_db.user_activity table reference - */ - public UserActivity() { - this(DSL.name("user_activity"), null); + private UserActivity(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private UserActivity(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); } /** @@ -94,12 +96,11 @@ public UserActivity(Name alias) { this(alias, USER_ACTIVITY); } - private UserActivity(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private UserActivity(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a texera_db.user_activity table reference + */ + public UserActivity() { + this(DSL.name("user_activity"), null); } public UserActivity(Table child, ForeignKey key) { @@ -108,7 +109,7 @@ public UserActivity(Table child, ForeignKey fieldsRow() { + public Row6 fieldsRow() { return (Row6) super.fieldsRow(); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/UserConfig.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/UserConfig.java index f1a1e63e110..7c10b2b1f05 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/UserConfig.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/UserConfig.java @@ -4,7 +4,6 @@ package edu.uci.ics.texera.dao.jooq.generated.tables; -import edu.uci.ics.texera.dao.jooq.generated.Indexes; import edu.uci.ics.texera.dao.jooq.generated.Keys; import edu.uci.ics.texera.dao.jooq.generated.TexeraDb; import edu.uci.ics.texera.dao.jooq.generated.tables.records.UserConfigRecord; @@ -14,17 +13,17 @@ import org.jooq.Field; import org.jooq.ForeignKey; -import org.jooq.Index; import org.jooq.Name; import org.jooq.Record; import org.jooq.Row3; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.UniqueKey; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; -import org.jooq.types.UInteger; /** @@ -33,7 +32,7 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class UserConfig extends TableImpl { - private static final long serialVersionUID = 585099027; + private static final long serialVersionUID = 1L; /** * The reference instance of texera_db.user_config @@ -51,23 +50,24 @@ public Class getRecordType() { /** * The column texera_db.user_config.uid. */ - public final TableField UID = createField(DSL.name("uid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, ""); + public final TableField UID = createField(DSL.name("uid"), SQLDataType.INTEGER.nullable(false), this, ""); /** * The column texera_db.user_config.key. */ - public final TableField KEY = createField(DSL.name("key"), org.jooq.impl.SQLDataType.VARCHAR(256).nullable(false), this, ""); + public final TableField KEY = createField(DSL.name("key"), SQLDataType.VARCHAR(256).nullable(false), this, ""); /** * The column texera_db.user_config.value. */ - public final TableField VALUE = createField(DSL.name("value"), org.jooq.impl.SQLDataType.CLOB.nullable(false), this, ""); + public final TableField VALUE = createField(DSL.name("value"), SQLDataType.CLOB.nullable(false), this, ""); - /** - * Create a texera_db.user_config table reference - */ - public UserConfig() { - this(DSL.name("user_config"), null); + private UserConfig(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private UserConfig(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); } /** @@ -84,12 +84,11 @@ public UserConfig(Name alias) { this(alias, USER_CONFIG); } - private UserConfig(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private UserConfig(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a texera_db.user_config table reference + */ + public UserConfig() { + this(DSL.name("user_config"), null); } public UserConfig(Table child, ForeignKey key) { @@ -98,31 +97,29 @@ public UserConfig(Table child, ForeignKey getIndexes() { - return Arrays.asList(Indexes.USER_CONFIG_PRIMARY); + return aliased() ? null : TexeraDb.TEXERA_DB; } @Override public UniqueKey getPrimaryKey() { - return Keys.KEY_USER_CONFIG_PRIMARY; - } - - @Override - public List> getKeys() { - return Arrays.>asList(Keys.KEY_USER_CONFIG_PRIMARY); + return Keys.USER_CONFIG_PKEY; } @Override public List> getReferences() { - return Arrays.>asList(Keys.USER_CONFIG_IBFK_1); + return Arrays.asList(Keys.USER_CONFIG__USER_CONFIG_UID_FKEY); } + private transient User _user; + + /** + * Get the implicit join path to the texera_db.user table. + */ public User user() { - return new User(this, Keys.USER_CONFIG_IBFK_1); + if (_user == null) + _user = new User(this, Keys.USER_CONFIG__USER_CONFIG_UID_FKEY); + + return _user; } @Override @@ -156,7 +153,7 @@ public UserConfig rename(Name name) { // ------------------------------------------------------------------------- @Override - public Row3 fieldsRow() { + public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/Workflow.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/Workflow.java index e730b28063e..27bb86ea355 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/Workflow.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/Workflow.java @@ -4,29 +4,26 @@ package edu.uci.ics.texera.dao.jooq.generated.tables; -import edu.uci.ics.texera.dao.jooq.generated.Indexes; import edu.uci.ics.texera.dao.jooq.generated.Keys; import edu.uci.ics.texera.dao.jooq.generated.TexeraDb; import edu.uci.ics.texera.dao.jooq.generated.tables.records.WorkflowRecord; import java.sql.Timestamp; -import java.util.Arrays; -import java.util.List; import org.jooq.Field; import org.jooq.ForeignKey; import org.jooq.Identity; -import org.jooq.Index; import org.jooq.Name; import org.jooq.Record; import org.jooq.Row7; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.UniqueKey; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; -import org.jooq.types.UInteger; /** @@ -35,7 +32,7 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class Workflow extends TableImpl { - private static final long serialVersionUID = 1942522218; + private static final long serialVersionUID = 1L; /** * The reference instance of texera_db.workflow @@ -51,45 +48,46 @@ public Class getRecordType() { } /** - * The column texera_db.workflow.name. + * The column texera_db.workflow.wid. */ - public final TableField NAME = createField(DSL.name("name"), org.jooq.impl.SQLDataType.VARCHAR(128).nullable(false), this, ""); + public final TableField WID = createField(DSL.name("wid"), SQLDataType.INTEGER.nullable(false).identity(true), this, ""); /** - * The column texera_db.workflow.description. + * The column texera_db.workflow.name. */ - public final TableField DESCRIPTION = createField(DSL.name("description"), org.jooq.impl.SQLDataType.VARCHAR(500), this, ""); + public final TableField NAME = createField(DSL.name("name"), SQLDataType.VARCHAR(128).nullable(false), this, ""); /** - * The column texera_db.workflow.wid. + * The column texera_db.workflow.description. */ - public final TableField WID = createField(DSL.name("wid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false).identity(true), this, ""); + public final TableField DESCRIPTION = createField(DSL.name("description"), SQLDataType.VARCHAR(500), this, ""); /** * The column texera_db.workflow.content. */ - public final TableField CONTENT = createField(DSL.name("content"), org.jooq.impl.SQLDataType.CLOB.nullable(false), this, ""); + public final TableField CONTENT = createField(DSL.name("content"), SQLDataType.CLOB.nullable(false), this, ""); /** * The column texera_db.workflow.creation_time. */ - public final TableField CREATION_TIME = createField(DSL.name("creation_time"), org.jooq.impl.SQLDataType.TIMESTAMP.nullable(false).defaultValue(org.jooq.impl.DSL.field("CURRENT_TIMESTAMP", org.jooq.impl.SQLDataType.TIMESTAMP)), this, ""); + public final TableField CREATION_TIME = createField(DSL.name("creation_time"), SQLDataType.TIMESTAMP(0).nullable(false).defaultValue(DSL.field("CURRENT_TIMESTAMP", SQLDataType.TIMESTAMP)), this, ""); /** * The column texera_db.workflow.last_modified_time. */ - public final TableField LAST_MODIFIED_TIME = createField(DSL.name("last_modified_time"), org.jooq.impl.SQLDataType.TIMESTAMP.nullable(false).defaultValue(org.jooq.impl.DSL.field("CURRENT_TIMESTAMP", org.jooq.impl.SQLDataType.TIMESTAMP)), this, ""); + public final TableField LAST_MODIFIED_TIME = createField(DSL.name("last_modified_time"), SQLDataType.TIMESTAMP(0).nullable(false).defaultValue(DSL.field("CURRENT_TIMESTAMP", SQLDataType.TIMESTAMP)), this, ""); /** * The column texera_db.workflow.is_public. */ - public final TableField IS_PUBLIC = createField(DSL.name("is_public"), org.jooq.impl.SQLDataType.TINYINT.nullable(false).defaultValue(org.jooq.impl.DSL.inline("0", org.jooq.impl.SQLDataType.TINYINT)), this, ""); + public final TableField IS_PUBLIC = createField(DSL.name("is_public"), SQLDataType.BOOLEAN.nullable(false).defaultValue(DSL.field("false", SQLDataType.BOOLEAN)), this, ""); - /** - * Create a texera_db.workflow table reference - */ - public Workflow() { - this(DSL.name("workflow"), null); + private Workflow(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private Workflow(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); } /** @@ -106,12 +104,11 @@ public Workflow(Name alias) { this(alias, WORKFLOW); } - private Workflow(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private Workflow(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a texera_db.workflow table reference + */ + public Workflow() { + this(DSL.name("workflow"), null); } public Workflow(Table child, ForeignKey key) { @@ -120,27 +117,17 @@ public Workflow(Table child, ForeignKey @Override public Schema getSchema() { - return TexeraDb.TEXERA_DB; - } - - @Override - public List getIndexes() { - return Arrays.asList(Indexes.WORKFLOW_IDX_WORKFLOW_NAME_DESCRIPTION_CONTENT, Indexes.WORKFLOW_PRIMARY); + return aliased() ? null : TexeraDb.TEXERA_DB; } @Override - public Identity getIdentity() { - return Keys.IDENTITY_WORKFLOW; + public Identity getIdentity() { + return (Identity) super.getIdentity(); } @Override public UniqueKey getPrimaryKey() { - return Keys.KEY_WORKFLOW_PRIMARY; - } - - @Override - public List> getKeys() { - return Arrays.>asList(Keys.KEY_WORKFLOW_PRIMARY); + return Keys.WORKFLOW_PKEY; } @Override @@ -174,7 +161,7 @@ public Workflow rename(Name name) { // ------------------------------------------------------------------------- @Override - public Row7 fieldsRow() { + public Row7 fieldsRow() { return (Row7) super.fieldsRow(); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/WorkflowExecutions.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/WorkflowExecutions.java index 7e64fcc5bc2..fec1b4bb966 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/WorkflowExecutions.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/WorkflowExecutions.java @@ -4,7 +4,6 @@ package edu.uci.ics.texera.dao.jooq.generated.tables; -import edu.uci.ics.texera.dao.jooq.generated.Indexes; import edu.uci.ics.texera.dao.jooq.generated.Keys; import edu.uci.ics.texera.dao.jooq.generated.TexeraDb; import edu.uci.ics.texera.dao.jooq.generated.tables.records.WorkflowExecutionsRecord; @@ -16,17 +15,17 @@ import org.jooq.Field; import org.jooq.ForeignKey; import org.jooq.Identity; -import org.jooq.Index; import org.jooq.Name; import org.jooq.Record; import org.jooq.Row12; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.UniqueKey; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; -import org.jooq.types.UInteger; /** @@ -35,7 +34,7 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class WorkflowExecutions extends TableImpl { - private static final long serialVersionUID = 1330691939; + private static final long serialVersionUID = 1L; /** * The reference instance of texera_db.workflow_executions @@ -53,90 +52,93 @@ public Class getRecordType() { /** * The column texera_db.workflow_executions.eid. */ - public final TableField EID = createField(DSL.name("eid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false).identity(true), this, ""); + public final TableField EID = createField(DSL.name("eid"), SQLDataType.INTEGER.nullable(false).identity(true), this, ""); /** * The column texera_db.workflow_executions.vid. */ - public final TableField VID = createField(DSL.name("vid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, ""); + public final TableField VID = createField(DSL.name("vid"), SQLDataType.INTEGER.nullable(false), this, ""); /** * The column texera_db.workflow_executions.uid. */ - public final TableField UID = createField(DSL.name("uid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, ""); + public final TableField UID = createField(DSL.name("uid"), SQLDataType.INTEGER.nullable(false), this, ""); /** * The column texera_db.workflow_executions.status. */ - public final TableField STATUS = createField(DSL.name("status"), org.jooq.impl.SQLDataType.TINYINT.nullable(false).defaultValue(org.jooq.impl.DSL.inline("1", org.jooq.impl.SQLDataType.TINYINT)), this, ""); + public final TableField STATUS = createField(DSL.name("status"), SQLDataType.SMALLINT.nullable(false).defaultValue(DSL.field("1", SQLDataType.SMALLINT)), this, ""); /** * The column texera_db.workflow_executions.result. */ - public final TableField RESULT = createField(DSL.name("result"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField RESULT = createField(DSL.name("result"), SQLDataType.CLOB, this, ""); /** * The column texera_db.workflow_executions.starting_time. */ - public final TableField STARTING_TIME = createField(DSL.name("starting_time"), org.jooq.impl.SQLDataType.TIMESTAMP.nullable(false).defaultValue(org.jooq.impl.DSL.field("CURRENT_TIMESTAMP", org.jooq.impl.SQLDataType.TIMESTAMP)), this, ""); + public final TableField STARTING_TIME = createField(DSL.name("starting_time"), SQLDataType.TIMESTAMP(0).nullable(false).defaultValue(DSL.field("CURRENT_TIMESTAMP", SQLDataType.TIMESTAMP)), this, ""); /** * The column texera_db.workflow_executions.last_update_time. */ - public final TableField LAST_UPDATE_TIME = createField(DSL.name("last_update_time"), org.jooq.impl.SQLDataType.TIMESTAMP, this, ""); + public final TableField LAST_UPDATE_TIME = createField(DSL.name("last_update_time"), SQLDataType.TIMESTAMP(0), this, ""); /** * The column texera_db.workflow_executions.bookmarked. */ - public final TableField BOOKMARKED = createField(DSL.name("bookmarked"), org.jooq.impl.SQLDataType.TINYINT.defaultValue(org.jooq.impl.DSL.inline("0", org.jooq.impl.SQLDataType.TINYINT)), this, ""); + public final TableField BOOKMARKED = createField(DSL.name("bookmarked"), SQLDataType.BOOLEAN.defaultValue(DSL.field("false", SQLDataType.BOOLEAN)), this, ""); /** * The column texera_db.workflow_executions.name. */ - public final TableField NAME = createField(DSL.name("name"), org.jooq.impl.SQLDataType.VARCHAR(128).nullable(false).defaultValue(org.jooq.impl.DSL.inline("Untitled Execution", org.jooq.impl.SQLDataType.VARCHAR)), this, ""); + public final TableField NAME = createField(DSL.name("name"), SQLDataType.VARCHAR(128).nullable(false).defaultValue(DSL.field("'Untitled Execution'::character varying", SQLDataType.VARCHAR)), this, ""); /** - * The column texera_db.workflow_executions.environment_version. + * The column + * texera_db.workflow_executions.environment_version. */ - public final TableField ENVIRONMENT_VERSION = createField(DSL.name("environment_version"), org.jooq.impl.SQLDataType.VARCHAR(128).nullable(false), this, ""); + public final TableField ENVIRONMENT_VERSION = createField(DSL.name("environment_version"), SQLDataType.VARCHAR(128).nullable(false), this, ""); /** * The column texera_db.workflow_executions.log_location. */ - public final TableField LOG_LOCATION = createField(DSL.name("log_location"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField LOG_LOCATION = createField(DSL.name("log_location"), SQLDataType.CLOB, this, ""); /** * The column texera_db.workflow_executions.runtime_stats_uri. */ - public final TableField RUNTIME_STATS_URI = createField(DSL.name("runtime_stats_uri"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField RUNTIME_STATS_URI = createField(DSL.name("runtime_stats_uri"), SQLDataType.CLOB, this, ""); - /** - * Create a texera_db.workflow_executions table reference - */ - public WorkflowExecutions() { - this(DSL.name("workflow_executions"), null); + private WorkflowExecutions(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private WorkflowExecutions(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); } /** - * Create an aliased texera_db.workflow_executions table reference + * Create an aliased texera_db.workflow_executions table + * reference */ public WorkflowExecutions(String alias) { this(DSL.name(alias), WORKFLOW_EXECUTIONS); } /** - * Create an aliased texera_db.workflow_executions table reference + * Create an aliased texera_db.workflow_executions table + * reference */ public WorkflowExecutions(Name alias) { this(alias, WORKFLOW_EXECUTIONS); } - private WorkflowExecutions(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private WorkflowExecutions(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a texera_db.workflow_executions table reference + */ + public WorkflowExecutions() { + this(DSL.name("workflow_executions"), null); } public WorkflowExecutions(Table child, ForeignKey key) { @@ -145,40 +147,46 @@ public WorkflowExecutions(Table child, ForeignKey getIndexes() { - return Arrays.asList(Indexes.WORKFLOW_EXECUTIONS_PRIMARY, Indexes.WORKFLOW_EXECUTIONS_UID, Indexes.WORKFLOW_EXECUTIONS_VID); + return aliased() ? null : TexeraDb.TEXERA_DB; } @Override - public Identity getIdentity() { - return Keys.IDENTITY_WORKFLOW_EXECUTIONS; + public Identity getIdentity() { + return (Identity) super.getIdentity(); } @Override public UniqueKey getPrimaryKey() { - return Keys.KEY_WORKFLOW_EXECUTIONS_PRIMARY; - } - - @Override - public List> getKeys() { - return Arrays.>asList(Keys.KEY_WORKFLOW_EXECUTIONS_PRIMARY); + return Keys.WORKFLOW_EXECUTIONS_PKEY; } @Override public List> getReferences() { - return Arrays.>asList(Keys.WORKFLOW_EXECUTIONS_IBFK_1, Keys.WORKFLOW_EXECUTIONS_IBFK_2); + return Arrays.asList(Keys.WORKFLOW_EXECUTIONS__WORKFLOW_EXECUTIONS_VID_FKEY, Keys.WORKFLOW_EXECUTIONS__WORKFLOW_EXECUTIONS_UID_FKEY); } + private transient WorkflowVersion _workflowVersion; + private transient User _user; + + /** + * Get the implicit join path to the texera_db.workflow_version + * table. + */ public WorkflowVersion workflowVersion() { - return new WorkflowVersion(this, Keys.WORKFLOW_EXECUTIONS_IBFK_1); + if (_workflowVersion == null) + _workflowVersion = new WorkflowVersion(this, Keys.WORKFLOW_EXECUTIONS__WORKFLOW_EXECUTIONS_VID_FKEY); + + return _workflowVersion; } + /** + * Get the implicit join path to the texera_db.user table. + */ public User user() { - return new User(this, Keys.WORKFLOW_EXECUTIONS_IBFK_2); + if (_user == null) + _user = new User(this, Keys.WORKFLOW_EXECUTIONS__WORKFLOW_EXECUTIONS_UID_FKEY); + + return _user; } @Override @@ -212,7 +220,7 @@ public WorkflowExecutions rename(Name name) { // ------------------------------------------------------------------------- @Override - public Row12 fieldsRow() { + public Row12 fieldsRow() { return (Row12) super.fieldsRow(); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/WorkflowOfProject.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/WorkflowOfProject.java index 7d44d5ce922..2c5e1f042b5 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/WorkflowOfProject.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/WorkflowOfProject.java @@ -4,7 +4,6 @@ package edu.uci.ics.texera.dao.jooq.generated.tables; -import edu.uci.ics.texera.dao.jooq.generated.Indexes; import edu.uci.ics.texera.dao.jooq.generated.Keys; import edu.uci.ics.texera.dao.jooq.generated.TexeraDb; import edu.uci.ics.texera.dao.jooq.generated.tables.records.WorkflowOfProjectRecord; @@ -14,17 +13,17 @@ import org.jooq.Field; import org.jooq.ForeignKey; -import org.jooq.Index; import org.jooq.Name; import org.jooq.Record; import org.jooq.Row2; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.UniqueKey; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; -import org.jooq.types.UInteger; /** @@ -33,7 +32,7 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class WorkflowOfProject extends TableImpl { - private static final long serialVersionUID = 264282867; + private static final long serialVersionUID = 1L; /** * The reference instance of texera_db.workflow_of_project @@ -51,40 +50,42 @@ public Class getRecordType() { /** * The column texera_db.workflow_of_project.wid. */ - public final TableField WID = createField(DSL.name("wid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, ""); + public final TableField WID = createField(DSL.name("wid"), SQLDataType.INTEGER.nullable(false), this, ""); /** * The column texera_db.workflow_of_project.pid. */ - public final TableField PID = createField(DSL.name("pid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, ""); + public final TableField PID = createField(DSL.name("pid"), SQLDataType.INTEGER.nullable(false), this, ""); - /** - * Create a texera_db.workflow_of_project table reference - */ - public WorkflowOfProject() { - this(DSL.name("workflow_of_project"), null); + private WorkflowOfProject(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private WorkflowOfProject(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); } /** - * Create an aliased texera_db.workflow_of_project table reference + * Create an aliased texera_db.workflow_of_project table + * reference */ public WorkflowOfProject(String alias) { this(DSL.name(alias), WORKFLOW_OF_PROJECT); } /** - * Create an aliased texera_db.workflow_of_project table reference + * Create an aliased texera_db.workflow_of_project table + * reference */ public WorkflowOfProject(Name alias) { this(alias, WORKFLOW_OF_PROJECT); } - private WorkflowOfProject(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private WorkflowOfProject(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a texera_db.workflow_of_project table reference + */ + public WorkflowOfProject() { + this(DSL.name("workflow_of_project"), null); } public WorkflowOfProject(Table child, ForeignKey key) { @@ -93,35 +94,40 @@ public WorkflowOfProject(Table child, ForeignKey getIndexes() { - return Arrays.asList(Indexes.WORKFLOW_OF_PROJECT_PID, Indexes.WORKFLOW_OF_PROJECT_PRIMARY); + return aliased() ? null : TexeraDb.TEXERA_DB; } @Override public UniqueKey getPrimaryKey() { - return Keys.KEY_WORKFLOW_OF_PROJECT_PRIMARY; - } - - @Override - public List> getKeys() { - return Arrays.>asList(Keys.KEY_WORKFLOW_OF_PROJECT_PRIMARY); + return Keys.WORKFLOW_OF_PROJECT_PKEY; } @Override public List> getReferences() { - return Arrays.>asList(Keys.WORKFLOW_OF_PROJECT_IBFK_1, Keys.WORKFLOW_OF_PROJECT_IBFK_2); + return Arrays.asList(Keys.WORKFLOW_OF_PROJECT__WORKFLOW_OF_PROJECT_WID_FKEY, Keys.WORKFLOW_OF_PROJECT__WORKFLOW_OF_PROJECT_PID_FKEY); } + private transient Workflow _workflow; + private transient Project _project; + + /** + * Get the implicit join path to the texera_db.workflow table. + */ public Workflow workflow() { - return new Workflow(this, Keys.WORKFLOW_OF_PROJECT_IBFK_1); + if (_workflow == null) + _workflow = new Workflow(this, Keys.WORKFLOW_OF_PROJECT__WORKFLOW_OF_PROJECT_WID_FKEY); + + return _workflow; } + /** + * Get the implicit join path to the texera_db.project table. + */ public Project project() { - return new Project(this, Keys.WORKFLOW_OF_PROJECT_IBFK_2); + if (_project == null) + _project = new Project(this, Keys.WORKFLOW_OF_PROJECT__WORKFLOW_OF_PROJECT_PID_FKEY); + + return _project; } @Override @@ -155,7 +161,7 @@ public WorkflowOfProject rename(Name name) { // ------------------------------------------------------------------------- @Override - public Row2 fieldsRow() { + public Row2 fieldsRow() { return (Row2) super.fieldsRow(); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/WorkflowOfUser.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/WorkflowOfUser.java index f8487019ef2..c21251f2530 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/WorkflowOfUser.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/WorkflowOfUser.java @@ -4,7 +4,6 @@ package edu.uci.ics.texera.dao.jooq.generated.tables; -import edu.uci.ics.texera.dao.jooq.generated.Indexes; import edu.uci.ics.texera.dao.jooq.generated.Keys; import edu.uci.ics.texera.dao.jooq.generated.TexeraDb; import edu.uci.ics.texera.dao.jooq.generated.tables.records.WorkflowOfUserRecord; @@ -14,17 +13,17 @@ import org.jooq.Field; import org.jooq.ForeignKey; -import org.jooq.Index; import org.jooq.Name; import org.jooq.Record; import org.jooq.Row2; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.UniqueKey; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; -import org.jooq.types.UInteger; /** @@ -33,7 +32,7 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class WorkflowOfUser extends TableImpl { - private static final long serialVersionUID = 754261799; + private static final long serialVersionUID = 1L; /** * The reference instance of texera_db.workflow_of_user @@ -51,18 +50,19 @@ public Class getRecordType() { /** * The column texera_db.workflow_of_user.uid. */ - public final TableField UID = createField(DSL.name("uid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, ""); + public final TableField UID = createField(DSL.name("uid"), SQLDataType.INTEGER.nullable(false), this, ""); /** * The column texera_db.workflow_of_user.wid. */ - public final TableField WID = createField(DSL.name("wid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, ""); + public final TableField WID = createField(DSL.name("wid"), SQLDataType.INTEGER.nullable(false), this, ""); - /** - * Create a texera_db.workflow_of_user table reference - */ - public WorkflowOfUser() { - this(DSL.name("workflow_of_user"), null); + private WorkflowOfUser(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private WorkflowOfUser(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); } /** @@ -79,12 +79,11 @@ public WorkflowOfUser(Name alias) { this(alias, WORKFLOW_OF_USER); } - private WorkflowOfUser(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private WorkflowOfUser(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a texera_db.workflow_of_user table reference + */ + public WorkflowOfUser() { + this(DSL.name("workflow_of_user"), null); } public WorkflowOfUser(Table child, ForeignKey key) { @@ -93,35 +92,40 @@ public WorkflowOfUser(Table child, ForeignKey getIndexes() { - return Arrays.asList(Indexes.WORKFLOW_OF_USER_PRIMARY, Indexes.WORKFLOW_OF_USER_WID); + return aliased() ? null : TexeraDb.TEXERA_DB; } @Override public UniqueKey getPrimaryKey() { - return Keys.KEY_WORKFLOW_OF_USER_PRIMARY; - } - - @Override - public List> getKeys() { - return Arrays.>asList(Keys.KEY_WORKFLOW_OF_USER_PRIMARY); + return Keys.WORKFLOW_OF_USER_PKEY; } @Override public List> getReferences() { - return Arrays.>asList(Keys.WORKFLOW_OF_USER_IBFK_1, Keys.WORKFLOW_OF_USER_IBFK_2); + return Arrays.asList(Keys.WORKFLOW_OF_USER__WORKFLOW_OF_USER_UID_FKEY, Keys.WORKFLOW_OF_USER__WORKFLOW_OF_USER_WID_FKEY); } + private transient User _user; + private transient Workflow _workflow; + + /** + * Get the implicit join path to the texera_db.user table. + */ public User user() { - return new User(this, Keys.WORKFLOW_OF_USER_IBFK_1); + if (_user == null) + _user = new User(this, Keys.WORKFLOW_OF_USER__WORKFLOW_OF_USER_UID_FKEY); + + return _user; } + /** + * Get the implicit join path to the texera_db.workflow table. + */ public Workflow workflow() { - return new Workflow(this, Keys.WORKFLOW_OF_USER_IBFK_2); + if (_workflow == null) + _workflow = new Workflow(this, Keys.WORKFLOW_OF_USER__WORKFLOW_OF_USER_WID_FKEY); + + return _workflow; } @Override @@ -155,7 +159,7 @@ public WorkflowOfUser rename(Name name) { // ------------------------------------------------------------------------- @Override - public Row2 fieldsRow() { + public Row2 fieldsRow() { return (Row2) super.fieldsRow(); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/WorkflowUserAccess.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/WorkflowUserAccess.java index 27ed271e6eb..29e64a3b5bd 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/WorkflowUserAccess.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/WorkflowUserAccess.java @@ -4,10 +4,9 @@ package edu.uci.ics.texera.dao.jooq.generated.tables; -import edu.uci.ics.texera.dao.jooq.generated.Indexes; import edu.uci.ics.texera.dao.jooq.generated.Keys; import edu.uci.ics.texera.dao.jooq.generated.TexeraDb; -import edu.uci.ics.texera.dao.jooq.generated.enums.WorkflowUserAccessPrivilege; +import edu.uci.ics.texera.dao.jooq.generated.enums.PrivilegeEnum; import edu.uci.ics.texera.dao.jooq.generated.tables.records.WorkflowUserAccessRecord; import java.util.Arrays; @@ -15,17 +14,17 @@ import org.jooq.Field; import org.jooq.ForeignKey; -import org.jooq.Index; import org.jooq.Name; import org.jooq.Record; import org.jooq.Row3; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.UniqueKey; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; -import org.jooq.types.UInteger; /** @@ -34,7 +33,7 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class WorkflowUserAccess extends TableImpl { - private static final long serialVersionUID = 349641006; + private static final long serialVersionUID = 1L; /** * The reference instance of texera_db.workflow_user_access @@ -52,45 +51,47 @@ public Class getRecordType() { /** * The column texera_db.workflow_user_access.uid. */ - public final TableField UID = createField(DSL.name("uid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, ""); + public final TableField UID = createField(DSL.name("uid"), SQLDataType.INTEGER.nullable(false), this, ""); /** * The column texera_db.workflow_user_access.wid. */ - public final TableField WID = createField(DSL.name("wid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, ""); + public final TableField WID = createField(DSL.name("wid"), SQLDataType.INTEGER.nullable(false), this, ""); /** * The column texera_db.workflow_user_access.privilege. */ - public final TableField PRIVILEGE = createField(DSL.name("privilege"), org.jooq.impl.SQLDataType.VARCHAR(5).nullable(false).defaultValue(org.jooq.impl.DSL.inline("NONE", org.jooq.impl.SQLDataType.VARCHAR)).asEnumDataType(edu.uci.ics.texera.dao.jooq.generated.enums.WorkflowUserAccessPrivilege.class), this, ""); + public final TableField PRIVILEGE = createField(DSL.name("privilege"), SQLDataType.VARCHAR.nullable(false).defaultValue(DSL.field("'NONE'::texera_db.privilege_enum", SQLDataType.VARCHAR)).asEnumDataType(edu.uci.ics.texera.dao.jooq.generated.enums.PrivilegeEnum.class), this, ""); - /** - * Create a texera_db.workflow_user_access table reference - */ - public WorkflowUserAccess() { - this(DSL.name("workflow_user_access"), null); + private WorkflowUserAccess(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private WorkflowUserAccess(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); } /** - * Create an aliased texera_db.workflow_user_access table reference + * Create an aliased texera_db.workflow_user_access table + * reference */ public WorkflowUserAccess(String alias) { this(DSL.name(alias), WORKFLOW_USER_ACCESS); } /** - * Create an aliased texera_db.workflow_user_access table reference + * Create an aliased texera_db.workflow_user_access table + * reference */ public WorkflowUserAccess(Name alias) { this(alias, WORKFLOW_USER_ACCESS); } - private WorkflowUserAccess(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private WorkflowUserAccess(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a texera_db.workflow_user_access table reference + */ + public WorkflowUserAccess() { + this(DSL.name("workflow_user_access"), null); } public WorkflowUserAccess(Table child, ForeignKey key) { @@ -99,35 +100,40 @@ public WorkflowUserAccess(Table child, ForeignKey getIndexes() { - return Arrays.asList(Indexes.WORKFLOW_USER_ACCESS_PRIMARY, Indexes.WORKFLOW_USER_ACCESS_WID); + return aliased() ? null : TexeraDb.TEXERA_DB; } @Override public UniqueKey getPrimaryKey() { - return Keys.KEY_WORKFLOW_USER_ACCESS_PRIMARY; - } - - @Override - public List> getKeys() { - return Arrays.>asList(Keys.KEY_WORKFLOW_USER_ACCESS_PRIMARY); + return Keys.WORKFLOW_USER_ACCESS_PKEY; } @Override public List> getReferences() { - return Arrays.>asList(Keys.WORKFLOW_USER_ACCESS_IBFK_1, Keys.WORKFLOW_USER_ACCESS_IBFK_2); + return Arrays.asList(Keys.WORKFLOW_USER_ACCESS__WORKFLOW_USER_ACCESS_UID_FKEY, Keys.WORKFLOW_USER_ACCESS__WORKFLOW_USER_ACCESS_WID_FKEY); } + private transient User _user; + private transient Workflow _workflow; + + /** + * Get the implicit join path to the texera_db.user table. + */ public User user() { - return new User(this, Keys.WORKFLOW_USER_ACCESS_IBFK_1); + if (_user == null) + _user = new User(this, Keys.WORKFLOW_USER_ACCESS__WORKFLOW_USER_ACCESS_UID_FKEY); + + return _user; } + /** + * Get the implicit join path to the texera_db.workflow table. + */ public Workflow workflow() { - return new Workflow(this, Keys.WORKFLOW_USER_ACCESS_IBFK_2); + if (_workflow == null) + _workflow = new Workflow(this, Keys.WORKFLOW_USER_ACCESS__WORKFLOW_USER_ACCESS_WID_FKEY); + + return _workflow; } @Override @@ -161,7 +167,7 @@ public WorkflowUserAccess rename(Name name) { // ------------------------------------------------------------------------- @Override - public Row3 fieldsRow() { + public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/WorkflowUserClones.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/WorkflowUserClones.java index 116c6e22db4..88b367b0dc5 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/WorkflowUserClones.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/WorkflowUserClones.java @@ -4,7 +4,6 @@ package edu.uci.ics.texera.dao.jooq.generated.tables; -import edu.uci.ics.texera.dao.jooq.generated.Indexes; import edu.uci.ics.texera.dao.jooq.generated.Keys; import edu.uci.ics.texera.dao.jooq.generated.TexeraDb; import edu.uci.ics.texera.dao.jooq.generated.tables.records.WorkflowUserClonesRecord; @@ -14,17 +13,17 @@ import org.jooq.Field; import org.jooq.ForeignKey; -import org.jooq.Index; import org.jooq.Name; import org.jooq.Record; import org.jooq.Row2; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.UniqueKey; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; -import org.jooq.types.UInteger; /** @@ -33,7 +32,7 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class WorkflowUserClones extends TableImpl { - private static final long serialVersionUID = 2096098879; + private static final long serialVersionUID = 1L; /** * The reference instance of texera_db.workflow_user_clones @@ -51,40 +50,42 @@ public Class getRecordType() { /** * The column texera_db.workflow_user_clones.uid. */ - public final TableField UID = createField(DSL.name("uid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, ""); + public final TableField UID = createField(DSL.name("uid"), SQLDataType.INTEGER.nullable(false), this, ""); /** * The column texera_db.workflow_user_clones.wid. */ - public final TableField WID = createField(DSL.name("wid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, ""); + public final TableField WID = createField(DSL.name("wid"), SQLDataType.INTEGER.nullable(false), this, ""); - /** - * Create a texera_db.workflow_user_clones table reference - */ - public WorkflowUserClones() { - this(DSL.name("workflow_user_clones"), null); + private WorkflowUserClones(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private WorkflowUserClones(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); } /** - * Create an aliased texera_db.workflow_user_clones table reference + * Create an aliased texera_db.workflow_user_clones table + * reference */ public WorkflowUserClones(String alias) { this(DSL.name(alias), WORKFLOW_USER_CLONES); } /** - * Create an aliased texera_db.workflow_user_clones table reference + * Create an aliased texera_db.workflow_user_clones table + * reference */ public WorkflowUserClones(Name alias) { this(alias, WORKFLOW_USER_CLONES); } - private WorkflowUserClones(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private WorkflowUserClones(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a texera_db.workflow_user_clones table reference + */ + public WorkflowUserClones() { + this(DSL.name("workflow_user_clones"), null); } public WorkflowUserClones(Table child, ForeignKey key) { @@ -93,35 +94,40 @@ public WorkflowUserClones(Table child, ForeignKey getIndexes() { - return Arrays.asList(Indexes.WORKFLOW_USER_CLONES_PRIMARY, Indexes.WORKFLOW_USER_CLONES_WID); + return aliased() ? null : TexeraDb.TEXERA_DB; } @Override public UniqueKey getPrimaryKey() { - return Keys.KEY_WORKFLOW_USER_CLONES_PRIMARY; - } - - @Override - public List> getKeys() { - return Arrays.>asList(Keys.KEY_WORKFLOW_USER_CLONES_PRIMARY); + return Keys.WORKFLOW_USER_CLONES_PKEY; } @Override public List> getReferences() { - return Arrays.>asList(Keys.WORKFLOW_USER_CLONES_IBFK_1, Keys.WORKFLOW_USER_CLONES_IBFK_2); + return Arrays.asList(Keys.WORKFLOW_USER_CLONES__WORKFLOW_USER_CLONES_UID_FKEY, Keys.WORKFLOW_USER_CLONES__WORKFLOW_USER_CLONES_WID_FKEY); } + private transient User _user; + private transient Workflow _workflow; + + /** + * Get the implicit join path to the texera_db.user table. + */ public User user() { - return new User(this, Keys.WORKFLOW_USER_CLONES_IBFK_1); + if (_user == null) + _user = new User(this, Keys.WORKFLOW_USER_CLONES__WORKFLOW_USER_CLONES_UID_FKEY); + + return _user; } + /** + * Get the implicit join path to the texera_db.workflow table. + */ public Workflow workflow() { - return new Workflow(this, Keys.WORKFLOW_USER_CLONES_IBFK_2); + if (_workflow == null) + _workflow = new Workflow(this, Keys.WORKFLOW_USER_CLONES__WORKFLOW_USER_CLONES_WID_FKEY); + + return _workflow; } @Override @@ -155,7 +161,7 @@ public WorkflowUserClones rename(Name name) { // ------------------------------------------------------------------------- @Override - public Row2 fieldsRow() { + public Row2 fieldsRow() { return (Row2) super.fieldsRow(); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/WorkflowUserLikes.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/WorkflowUserLikes.java index 38fd8010ca3..4a25f04febd 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/WorkflowUserLikes.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/WorkflowUserLikes.java @@ -4,7 +4,6 @@ package edu.uci.ics.texera.dao.jooq.generated.tables; -import edu.uci.ics.texera.dao.jooq.generated.Indexes; import edu.uci.ics.texera.dao.jooq.generated.Keys; import edu.uci.ics.texera.dao.jooq.generated.TexeraDb; import edu.uci.ics.texera.dao.jooq.generated.tables.records.WorkflowUserLikesRecord; @@ -14,17 +13,17 @@ import org.jooq.Field; import org.jooq.ForeignKey; -import org.jooq.Index; import org.jooq.Name; import org.jooq.Record; import org.jooq.Row2; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.UniqueKey; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; -import org.jooq.types.UInteger; /** @@ -33,7 +32,7 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class WorkflowUserLikes extends TableImpl { - private static final long serialVersionUID = -1712382581; + private static final long serialVersionUID = 1L; /** * The reference instance of texera_db.workflow_user_likes @@ -51,40 +50,42 @@ public Class getRecordType() { /** * The column texera_db.workflow_user_likes.uid. */ - public final TableField UID = createField(DSL.name("uid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, ""); + public final TableField UID = createField(DSL.name("uid"), SQLDataType.INTEGER.nullable(false), this, ""); /** * The column texera_db.workflow_user_likes.wid. */ - public final TableField WID = createField(DSL.name("wid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, ""); + public final TableField WID = createField(DSL.name("wid"), SQLDataType.INTEGER.nullable(false), this, ""); - /** - * Create a texera_db.workflow_user_likes table reference - */ - public WorkflowUserLikes() { - this(DSL.name("workflow_user_likes"), null); + private WorkflowUserLikes(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private WorkflowUserLikes(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); } /** - * Create an aliased texera_db.workflow_user_likes table reference + * Create an aliased texera_db.workflow_user_likes table + * reference */ public WorkflowUserLikes(String alias) { this(DSL.name(alias), WORKFLOW_USER_LIKES); } /** - * Create an aliased texera_db.workflow_user_likes table reference + * Create an aliased texera_db.workflow_user_likes table + * reference */ public WorkflowUserLikes(Name alias) { this(alias, WORKFLOW_USER_LIKES); } - private WorkflowUserLikes(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private WorkflowUserLikes(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a texera_db.workflow_user_likes table reference + */ + public WorkflowUserLikes() { + this(DSL.name("workflow_user_likes"), null); } public WorkflowUserLikes(Table child, ForeignKey key) { @@ -93,35 +94,40 @@ public WorkflowUserLikes(Table child, ForeignKey getIndexes() { - return Arrays.asList(Indexes.WORKFLOW_USER_LIKES_PRIMARY, Indexes.WORKFLOW_USER_LIKES_WID); + return aliased() ? null : TexeraDb.TEXERA_DB; } @Override public UniqueKey getPrimaryKey() { - return Keys.KEY_WORKFLOW_USER_LIKES_PRIMARY; - } - - @Override - public List> getKeys() { - return Arrays.>asList(Keys.KEY_WORKFLOW_USER_LIKES_PRIMARY); + return Keys.WORKFLOW_USER_LIKES_PKEY; } @Override public List> getReferences() { - return Arrays.>asList(Keys.WORKFLOW_USER_LIKES_IBFK_1, Keys.WORKFLOW_USER_LIKES_IBFK_2); + return Arrays.asList(Keys.WORKFLOW_USER_LIKES__WORKFLOW_USER_LIKES_UID_FKEY, Keys.WORKFLOW_USER_LIKES__WORKFLOW_USER_LIKES_WID_FKEY); } + private transient User _user; + private transient Workflow _workflow; + + /** + * Get the implicit join path to the texera_db.user table. + */ public User user() { - return new User(this, Keys.WORKFLOW_USER_LIKES_IBFK_1); + if (_user == null) + _user = new User(this, Keys.WORKFLOW_USER_LIKES__WORKFLOW_USER_LIKES_UID_FKEY); + + return _user; } + /** + * Get the implicit join path to the texera_db.workflow table. + */ public Workflow workflow() { - return new Workflow(this, Keys.WORKFLOW_USER_LIKES_IBFK_2); + if (_workflow == null) + _workflow = new Workflow(this, Keys.WORKFLOW_USER_LIKES__WORKFLOW_USER_LIKES_WID_FKEY); + + return _workflow; } @Override @@ -155,7 +161,7 @@ public WorkflowUserLikes rename(Name name) { // ------------------------------------------------------------------------- @Override - public Row2 fieldsRow() { + public Row2 fieldsRow() { return (Row2) super.fieldsRow(); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/WorkflowVersion.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/WorkflowVersion.java index 7f0fe1e3275..bcaa809c9f3 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/WorkflowVersion.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/WorkflowVersion.java @@ -4,7 +4,6 @@ package edu.uci.ics.texera.dao.jooq.generated.tables; -import edu.uci.ics.texera.dao.jooq.generated.Indexes; import edu.uci.ics.texera.dao.jooq.generated.Keys; import edu.uci.ics.texera.dao.jooq.generated.TexeraDb; import edu.uci.ics.texera.dao.jooq.generated.tables.records.WorkflowVersionRecord; @@ -16,17 +15,17 @@ import org.jooq.Field; import org.jooq.ForeignKey; import org.jooq.Identity; -import org.jooq.Index; import org.jooq.Name; import org.jooq.Record; import org.jooq.Row4; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.UniqueKey; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; -import org.jooq.types.UInteger; /** @@ -35,7 +34,7 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class WorkflowVersion extends TableImpl { - private static final long serialVersionUID = -1813902570; + private static final long serialVersionUID = 1L; /** * The reference instance of texera_db.workflow_version @@ -53,28 +52,29 @@ public Class getRecordType() { /** * The column texera_db.workflow_version.vid. */ - public final TableField VID = createField(DSL.name("vid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false).identity(true), this, ""); + public final TableField VID = createField(DSL.name("vid"), SQLDataType.INTEGER.nullable(false).identity(true), this, ""); /** * The column texera_db.workflow_version.wid. */ - public final TableField WID = createField(DSL.name("wid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, ""); + public final TableField WID = createField(DSL.name("wid"), SQLDataType.INTEGER.nullable(false), this, ""); /** * The column texera_db.workflow_version.content. */ - public final TableField CONTENT = createField(DSL.name("content"), org.jooq.impl.SQLDataType.CLOB.nullable(false), this, ""); + public final TableField CONTENT = createField(DSL.name("content"), SQLDataType.CLOB.nullable(false), this, ""); /** * The column texera_db.workflow_version.creation_time. */ - public final TableField CREATION_TIME = createField(DSL.name("creation_time"), org.jooq.impl.SQLDataType.TIMESTAMP.nullable(false).defaultValue(org.jooq.impl.DSL.field("CURRENT_TIMESTAMP", org.jooq.impl.SQLDataType.TIMESTAMP)), this, ""); + public final TableField CREATION_TIME = createField(DSL.name("creation_time"), SQLDataType.TIMESTAMP(0).nullable(false).defaultValue(DSL.field("CURRENT_TIMESTAMP", SQLDataType.TIMESTAMP)), this, ""); - /** - * Create a texera_db.workflow_version table reference - */ - public WorkflowVersion() { - this(DSL.name("workflow_version"), null); + private WorkflowVersion(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private WorkflowVersion(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); } /** @@ -91,12 +91,11 @@ public WorkflowVersion(Name alias) { this(alias, WORKFLOW_VERSION); } - private WorkflowVersion(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private WorkflowVersion(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a texera_db.workflow_version table reference + */ + public WorkflowVersion() { + this(DSL.name("workflow_version"), null); } public WorkflowVersion(Table child, ForeignKey key) { @@ -105,36 +104,34 @@ public WorkflowVersion(Table child, ForeignKey getIndexes() { - return Arrays.asList(Indexes.WORKFLOW_VERSION_PRIMARY, Indexes.WORKFLOW_VERSION_WID); + return aliased() ? null : TexeraDb.TEXERA_DB; } @Override - public Identity getIdentity() { - return Keys.IDENTITY_WORKFLOW_VERSION; + public Identity getIdentity() { + return (Identity) super.getIdentity(); } @Override public UniqueKey getPrimaryKey() { - return Keys.KEY_WORKFLOW_VERSION_PRIMARY; - } - - @Override - public List> getKeys() { - return Arrays.>asList(Keys.KEY_WORKFLOW_VERSION_PRIMARY); + return Keys.WORKFLOW_VERSION_PKEY; } @Override public List> getReferences() { - return Arrays.>asList(Keys.WORKFLOW_VERSION_IBFK_1); + return Arrays.asList(Keys.WORKFLOW_VERSION__WORKFLOW_VERSION_WID_FKEY); } + private transient Workflow _workflow; + + /** + * Get the implicit join path to the texera_db.workflow table. + */ public Workflow workflow() { - return new Workflow(this, Keys.WORKFLOW_VERSION_IBFK_1); + if (_workflow == null) + _workflow = new Workflow(this, Keys.WORKFLOW_VERSION__WORKFLOW_VERSION_WID_FKEY); + + return _workflow; } @Override @@ -168,7 +165,7 @@ public WorkflowVersion rename(Name name) { // ------------------------------------------------------------------------- @Override - public Row4 fieldsRow() { + public Row4 fieldsRow() { return (Row4) super.fieldsRow(); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/WorkflowViewCount.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/WorkflowViewCount.java index 4e920b53b45..a046e71845c 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/WorkflowViewCount.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/WorkflowViewCount.java @@ -4,7 +4,6 @@ package edu.uci.ics.texera.dao.jooq.generated.tables; -import edu.uci.ics.texera.dao.jooq.generated.Indexes; import edu.uci.ics.texera.dao.jooq.generated.Keys; import edu.uci.ics.texera.dao.jooq.generated.TexeraDb; import edu.uci.ics.texera.dao.jooq.generated.tables.records.WorkflowViewCountRecord; @@ -14,17 +13,17 @@ import org.jooq.Field; import org.jooq.ForeignKey; -import org.jooq.Index; import org.jooq.Name; import org.jooq.Record; import org.jooq.Row2; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.UniqueKey; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; -import org.jooq.types.UInteger; /** @@ -33,7 +32,7 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class WorkflowViewCount extends TableImpl { - private static final long serialVersionUID = -1514441832; + private static final long serialVersionUID = 1L; /** * The reference instance of texera_db.workflow_view_count @@ -51,40 +50,42 @@ public Class getRecordType() { /** * The column texera_db.workflow_view_count.wid. */ - public final TableField WID = createField(DSL.name("wid"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false), this, ""); + public final TableField WID = createField(DSL.name("wid"), SQLDataType.INTEGER.nullable(false), this, ""); /** * The column texera_db.workflow_view_count.view_count. */ - public final TableField VIEW_COUNT = createField(DSL.name("view_count"), org.jooq.impl.SQLDataType.INTEGERUNSIGNED.nullable(false).defaultValue(org.jooq.impl.DSL.inline("0", org.jooq.impl.SQLDataType.INTEGERUNSIGNED)), this, ""); + public final TableField VIEW_COUNT = createField(DSL.name("view_count"), SQLDataType.INTEGER.nullable(false).defaultValue(DSL.field("0", SQLDataType.INTEGER)), this, ""); - /** - * Create a texera_db.workflow_view_count table reference - */ - public WorkflowViewCount() { - this(DSL.name("workflow_view_count"), null); + private WorkflowViewCount(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private WorkflowViewCount(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); } /** - * Create an aliased texera_db.workflow_view_count table reference + * Create an aliased texera_db.workflow_view_count table + * reference */ public WorkflowViewCount(String alias) { this(DSL.name(alias), WORKFLOW_VIEW_COUNT); } /** - * Create an aliased texera_db.workflow_view_count table reference + * Create an aliased texera_db.workflow_view_count table + * reference */ public WorkflowViewCount(Name alias) { this(alias, WORKFLOW_VIEW_COUNT); } - private WorkflowViewCount(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private WorkflowViewCount(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a texera_db.workflow_view_count table reference + */ + public WorkflowViewCount() { + this(DSL.name("workflow_view_count"), null); } public WorkflowViewCount(Table child, ForeignKey key) { @@ -93,31 +94,29 @@ public WorkflowViewCount(Table child, ForeignKey getIndexes() { - return Arrays.asList(Indexes.WORKFLOW_VIEW_COUNT_PRIMARY); + return aliased() ? null : TexeraDb.TEXERA_DB; } @Override public UniqueKey getPrimaryKey() { - return Keys.KEY_WORKFLOW_VIEW_COUNT_PRIMARY; - } - - @Override - public List> getKeys() { - return Arrays.>asList(Keys.KEY_WORKFLOW_VIEW_COUNT_PRIMARY); + return Keys.WORKFLOW_VIEW_COUNT_PKEY; } @Override public List> getReferences() { - return Arrays.>asList(Keys.WORKFLOW_VIEW_COUNT_IBFK_1); + return Arrays.asList(Keys.WORKFLOW_VIEW_COUNT__WORKFLOW_VIEW_COUNT_WID_FKEY); } + private transient Workflow _workflow; + + /** + * Get the implicit join path to the texera_db.workflow table. + */ public Workflow workflow() { - return new Workflow(this, Keys.WORKFLOW_VIEW_COUNT_IBFK_1); + if (_workflow == null) + _workflow = new Workflow(this, Keys.WORKFLOW_VIEW_COUNT__WORKFLOW_VIEW_COUNT_WID_FKEY); + + return _workflow; } @Override @@ -151,7 +150,7 @@ public WorkflowViewCount rename(Name name) { // ------------------------------------------------------------------------- @Override - public Row2 fieldsRow() { + public Row2 fieldsRow() { return (Row2) super.fieldsRow(); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/DatasetDao.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/DatasetDao.java index 4668bef3a36..28beb66be54 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/DatasetDao.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/DatasetDao.java @@ -9,17 +9,17 @@ import java.sql.Timestamp; import java.util.List; +import java.util.Optional; import org.jooq.Configuration; import org.jooq.impl.DAOImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class DatasetDao extends DAOImpl { +public class DatasetDao extends DAOImpl { /** * Create a new DatasetDao without any configuration @@ -36,47 +36,57 @@ public DatasetDao(Configuration configuration) { } @Override - public UInteger getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.Dataset object) { + public Integer getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.Dataset object) { return object.getDid(); } /** - * Fetch records that have did BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have did BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfDid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfDid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(Dataset.DATASET.DID, lowerInclusive, upperInclusive); } /** * Fetch records that have did IN (values) */ - public List fetchByDid(UInteger... values) { + public List fetchByDid(Integer... values) { return fetch(Dataset.DATASET.DID, values); } /** * Fetch a unique record that has did = value */ - public edu.uci.ics.texera.dao.jooq.generated.tables.pojos.Dataset fetchOneByDid(UInteger value) { + public edu.uci.ics.texera.dao.jooq.generated.tables.pojos.Dataset fetchOneByDid(Integer value) { return fetchOne(Dataset.DATASET.DID, value); } /** - * Fetch records that have owner_uid BETWEEN lowerInclusive AND upperInclusive + * Fetch a unique record that has did = value + */ + public Optional fetchOptionalByDid(Integer value) { + return fetchOptional(Dataset.DATASET.DID, value); + } + + /** + * Fetch records that have owner_uid BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfOwnerUid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfOwnerUid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(Dataset.DATASET.OWNER_UID, lowerInclusive, upperInclusive); } /** * Fetch records that have owner_uid IN (values) */ - public List fetchByOwnerUid(UInteger... values) { + public List fetchByOwnerUid(Integer... values) { return fetch(Dataset.DATASET.OWNER_UID, values); } /** - * Fetch records that have name BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have name BETWEEN lowerInclusive AND + * upperInclusive */ public List fetchRangeOfName(String lowerInclusive, String upperInclusive) { return fetchRange(Dataset.DATASET.NAME, lowerInclusive, upperInclusive); @@ -90,21 +100,23 @@ public List fetchByN } /** - * Fetch records that have is_public BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have is_public BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfIsPublic(Byte lowerInclusive, Byte upperInclusive) { + public List fetchRangeOfIsPublic(Boolean lowerInclusive, Boolean upperInclusive) { return fetchRange(Dataset.DATASET.IS_PUBLIC, lowerInclusive, upperInclusive); } /** * Fetch records that have is_public IN (values) */ - public List fetchByIsPublic(Byte... values) { + public List fetchByIsPublic(Boolean... values) { return fetch(Dataset.DATASET.IS_PUBLIC, values); } /** - * Fetch records that have description BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have description BETWEEN lowerInclusive AND + * upperInclusive */ public List fetchRangeOfDescription(String lowerInclusive, String upperInclusive) { return fetchRange(Dataset.DATASET.DESCRIPTION, lowerInclusive, upperInclusive); @@ -118,7 +130,8 @@ public List fetchByD } /** - * Fetch records that have creation_time BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have creation_time BETWEEN lowerInclusive AND + * upperInclusive */ public List fetchRangeOfCreationTime(Timestamp lowerInclusive, Timestamp upperInclusive) { return fetchRange(Dataset.DATASET.CREATION_TIME, lowerInclusive, upperInclusive); diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/DatasetUserAccessDao.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/DatasetUserAccessDao.java index b427d9a4f25..b014b052501 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/DatasetUserAccessDao.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/DatasetUserAccessDao.java @@ -4,7 +4,7 @@ package edu.uci.ics.texera.dao.jooq.generated.tables.daos; -import edu.uci.ics.texera.dao.jooq.generated.enums.DatasetUserAccessPrivilege; +import edu.uci.ics.texera.dao.jooq.generated.enums.PrivilegeEnum; import edu.uci.ics.texera.dao.jooq.generated.tables.DatasetUserAccess; import edu.uci.ics.texera.dao.jooq.generated.tables.records.DatasetUserAccessRecord; @@ -13,14 +13,13 @@ import org.jooq.Configuration; import org.jooq.Record2; import org.jooq.impl.DAOImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class DatasetUserAccessDao extends DAOImpl> { +public class DatasetUserAccessDao extends DAOImpl> { /** * Create a new DatasetUserAccessDao without any configuration @@ -37,49 +36,52 @@ public DatasetUserAccessDao(Configuration configuration) { } @Override - public Record2 getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.DatasetUserAccess object) { + public Record2 getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.DatasetUserAccess object) { return compositeKeyRecord(object.getDid(), object.getUid()); } /** - * Fetch records that have did BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have did BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfDid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfDid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(DatasetUserAccess.DATASET_USER_ACCESS.DID, lowerInclusive, upperInclusive); } /** * Fetch records that have did IN (values) */ - public List fetchByDid(UInteger... values) { + public List fetchByDid(Integer... values) { return fetch(DatasetUserAccess.DATASET_USER_ACCESS.DID, values); } /** - * Fetch records that have uid BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have uid BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfUid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfUid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(DatasetUserAccess.DATASET_USER_ACCESS.UID, lowerInclusive, upperInclusive); } /** * Fetch records that have uid IN (values) */ - public List fetchByUid(UInteger... values) { + public List fetchByUid(Integer... values) { return fetch(DatasetUserAccess.DATASET_USER_ACCESS.UID, values); } /** - * Fetch records that have privilege BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have privilege BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfPrivilege(DatasetUserAccessPrivilege lowerInclusive, DatasetUserAccessPrivilege upperInclusive) { + public List fetchRangeOfPrivilege(PrivilegeEnum lowerInclusive, PrivilegeEnum upperInclusive) { return fetchRange(DatasetUserAccess.DATASET_USER_ACCESS.PRIVILEGE, lowerInclusive, upperInclusive); } /** * Fetch records that have privilege IN (values) */ - public List fetchByPrivilege(DatasetUserAccessPrivilege... values) { + public List fetchByPrivilege(PrivilegeEnum... values) { return fetch(DatasetUserAccess.DATASET_USER_ACCESS.PRIVILEGE, values); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/DatasetUserLikesDao.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/DatasetUserLikesDao.java index 2285b882dc9..34bd93c72f1 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/DatasetUserLikesDao.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/DatasetUserLikesDao.java @@ -12,14 +12,13 @@ import org.jooq.Configuration; import org.jooq.Record2; import org.jooq.impl.DAOImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class DatasetUserLikesDao extends DAOImpl> { +public class DatasetUserLikesDao extends DAOImpl> { /** * Create a new DatasetUserLikesDao without any configuration @@ -36,35 +35,37 @@ public DatasetUserLikesDao(Configuration configuration) { } @Override - public Record2 getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.DatasetUserLikes object) { + public Record2 getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.DatasetUserLikes object) { return compositeKeyRecord(object.getUid(), object.getDid()); } /** - * Fetch records that have uid BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have uid BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfUid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfUid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(DatasetUserLikes.DATASET_USER_LIKES.UID, lowerInclusive, upperInclusive); } /** * Fetch records that have uid IN (values) */ - public List fetchByUid(UInteger... values) { + public List fetchByUid(Integer... values) { return fetch(DatasetUserLikes.DATASET_USER_LIKES.UID, values); } /** - * Fetch records that have did BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have did BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfDid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfDid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(DatasetUserLikes.DATASET_USER_LIKES.DID, lowerInclusive, upperInclusive); } /** * Fetch records that have did IN (values) */ - public List fetchByDid(UInteger... values) { + public List fetchByDid(Integer... values) { return fetch(DatasetUserLikes.DATASET_USER_LIKES.DID, values); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/DatasetVersionDao.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/DatasetVersionDao.java index 9f8aca9ab6e..92441038079 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/DatasetVersionDao.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/DatasetVersionDao.java @@ -9,17 +9,17 @@ import java.sql.Timestamp; import java.util.List; +import java.util.Optional; import org.jooq.Configuration; import org.jooq.impl.DAOImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class DatasetVersionDao extends DAOImpl { +public class DatasetVersionDao extends DAOImpl { /** * Create a new DatasetVersionDao without any configuration @@ -36,61 +36,72 @@ public DatasetVersionDao(Configuration configuration) { } @Override - public UInteger getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.DatasetVersion object) { + public Integer getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.DatasetVersion object) { return object.getDvid(); } /** - * Fetch records that have dvid BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have dvid BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfDvid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfDvid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(DatasetVersion.DATASET_VERSION.DVID, lowerInclusive, upperInclusive); } /** * Fetch records that have dvid IN (values) */ - public List fetchByDvid(UInteger... values) { + public List fetchByDvid(Integer... values) { return fetch(DatasetVersion.DATASET_VERSION.DVID, values); } /** * Fetch a unique record that has dvid = value */ - public edu.uci.ics.texera.dao.jooq.generated.tables.pojos.DatasetVersion fetchOneByDvid(UInteger value) { + public edu.uci.ics.texera.dao.jooq.generated.tables.pojos.DatasetVersion fetchOneByDvid(Integer value) { return fetchOne(DatasetVersion.DATASET_VERSION.DVID, value); } /** - * Fetch records that have did BETWEEN lowerInclusive AND upperInclusive + * Fetch a unique record that has dvid = value + */ + public Optional fetchOptionalByDvid(Integer value) { + return fetchOptional(DatasetVersion.DATASET_VERSION.DVID, value); + } + + /** + * Fetch records that have did BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfDid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfDid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(DatasetVersion.DATASET_VERSION.DID, lowerInclusive, upperInclusive); } /** * Fetch records that have did IN (values) */ - public List fetchByDid(UInteger... values) { + public List fetchByDid(Integer... values) { return fetch(DatasetVersion.DATASET_VERSION.DID, values); } /** - * Fetch records that have creator_uid BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have creator_uid BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfCreatorUid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfCreatorUid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(DatasetVersion.DATASET_VERSION.CREATOR_UID, lowerInclusive, upperInclusive); } /** * Fetch records that have creator_uid IN (values) */ - public List fetchByCreatorUid(UInteger... values) { + public List fetchByCreatorUid(Integer... values) { return fetch(DatasetVersion.DATASET_VERSION.CREATOR_UID, values); } /** - * Fetch records that have name BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have name BETWEEN lowerInclusive AND + * upperInclusive */ public List fetchRangeOfName(String lowerInclusive, String upperInclusive) { return fetchRange(DatasetVersion.DATASET_VERSION.NAME, lowerInclusive, upperInclusive); @@ -104,7 +115,8 @@ public List f } /** - * Fetch records that have version_hash BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have version_hash BETWEEN lowerInclusive AND + * upperInclusive */ public List fetchRangeOfVersionHash(String lowerInclusive, String upperInclusive) { return fetchRange(DatasetVersion.DATASET_VERSION.VERSION_HASH, lowerInclusive, upperInclusive); @@ -118,7 +130,8 @@ public List f } /** - * Fetch records that have creation_time BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have creation_time BETWEEN lowerInclusive AND + * upperInclusive */ public List fetchRangeOfCreationTime(Timestamp lowerInclusive, Timestamp upperInclusive) { return fetchRange(DatasetVersion.DATASET_VERSION.CREATION_TIME, lowerInclusive, upperInclusive); diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/DatasetViewCountDao.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/DatasetViewCountDao.java index 054b783c925..72f815e0618 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/DatasetViewCountDao.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/DatasetViewCountDao.java @@ -8,17 +8,17 @@ import edu.uci.ics.texera.dao.jooq.generated.tables.records.DatasetViewCountRecord; import java.util.List; +import java.util.Optional; import org.jooq.Configuration; import org.jooq.impl.DAOImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class DatasetViewCountDao extends DAOImpl { +public class DatasetViewCountDao extends DAOImpl { /** * Create a new DatasetViewCountDao without any configuration @@ -35,42 +35,51 @@ public DatasetViewCountDao(Configuration configuration) { } @Override - public UInteger getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.DatasetViewCount object) { + public Integer getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.DatasetViewCount object) { return object.getDid(); } /** - * Fetch records that have did BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have did BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfDid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfDid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(DatasetViewCount.DATASET_VIEW_COUNT.DID, lowerInclusive, upperInclusive); } /** * Fetch records that have did IN (values) */ - public List fetchByDid(UInteger... values) { + public List fetchByDid(Integer... values) { return fetch(DatasetViewCount.DATASET_VIEW_COUNT.DID, values); } /** * Fetch a unique record that has did = value */ - public edu.uci.ics.texera.dao.jooq.generated.tables.pojos.DatasetViewCount fetchOneByDid(UInteger value) { + public edu.uci.ics.texera.dao.jooq.generated.tables.pojos.DatasetViewCount fetchOneByDid(Integer value) { return fetchOne(DatasetViewCount.DATASET_VIEW_COUNT.DID, value); } /** - * Fetch records that have view_count BETWEEN lowerInclusive AND upperInclusive + * Fetch a unique record that has did = value + */ + public Optional fetchOptionalByDid(Integer value) { + return fetchOptional(DatasetViewCount.DATASET_VIEW_COUNT.DID, value); + } + + /** + * Fetch records that have view_count BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfViewCount(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfViewCount(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(DatasetViewCount.DATASET_VIEW_COUNT.VIEW_COUNT, lowerInclusive, upperInclusive); } /** * Fetch records that have view_count IN (values) */ - public List fetchByViewCount(UInteger... values) { + public List fetchByViewCount(Integer... values) { return fetch(DatasetViewCount.DATASET_VIEW_COUNT.VIEW_COUNT, values); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/OperatorExecutionsDao.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/OperatorExecutionsDao.java new file mode 100644 index 00000000000..60acd0b9704 --- /dev/null +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/OperatorExecutionsDao.java @@ -0,0 +1,86 @@ +/* + * This file is generated by jOOQ. + */ +package edu.uci.ics.texera.dao.jooq.generated.tables.daos; + + +import edu.uci.ics.texera.dao.jooq.generated.tables.OperatorExecutions; +import edu.uci.ics.texera.dao.jooq.generated.tables.records.OperatorExecutionsRecord; + +import java.util.List; + +import org.jooq.Configuration; +import org.jooq.Record2; +import org.jooq.impl.DAOImpl; + + +/** + * This class is generated by jOOQ. + */ +@SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class OperatorExecutionsDao extends DAOImpl> { + + /** + * Create a new OperatorExecutionsDao without any configuration + */ + public OperatorExecutionsDao() { + super(OperatorExecutions.OPERATOR_EXECUTIONS, edu.uci.ics.texera.dao.jooq.generated.tables.pojos.OperatorExecutions.class); + } + + /** + * Create a new OperatorExecutionsDao with an attached configuration + */ + public OperatorExecutionsDao(Configuration configuration) { + super(OperatorExecutions.OPERATOR_EXECUTIONS, edu.uci.ics.texera.dao.jooq.generated.tables.pojos.OperatorExecutions.class, configuration); + } + + @Override + public Record2 getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.OperatorExecutions object) { + return compositeKeyRecord(object.getWorkflowExecutionId(), object.getOperatorId()); + } + + /** + * Fetch records that have workflow_execution_id BETWEEN + * lowerInclusive AND upperInclusive + */ + public List fetchRangeOfWorkflowExecutionId(Integer lowerInclusive, Integer upperInclusive) { + return fetchRange(OperatorExecutions.OPERATOR_EXECUTIONS.WORKFLOW_EXECUTION_ID, lowerInclusive, upperInclusive); + } + + /** + * Fetch records that have workflow_execution_id IN (values) + */ + public List fetchByWorkflowExecutionId(Integer... values) { + return fetch(OperatorExecutions.OPERATOR_EXECUTIONS.WORKFLOW_EXECUTION_ID, values); + } + + /** + * Fetch records that have operator_id BETWEEN lowerInclusive AND + * upperInclusive + */ + public List fetchRangeOfOperatorId(String lowerInclusive, String upperInclusive) { + return fetchRange(OperatorExecutions.OPERATOR_EXECUTIONS.OPERATOR_ID, lowerInclusive, upperInclusive); + } + + /** + * Fetch records that have operator_id IN (values) + */ + public List fetchByOperatorId(String... values) { + return fetch(OperatorExecutions.OPERATOR_EXECUTIONS.OPERATOR_ID, values); + } + + /** + * Fetch records that have console_messages_uri BETWEEN lowerInclusive + * AND upperInclusive + */ + public List fetchRangeOfConsoleMessagesUri(String lowerInclusive, String upperInclusive) { + return fetchRange(OperatorExecutions.OPERATOR_EXECUTIONS.CONSOLE_MESSAGES_URI, lowerInclusive, upperInclusive); + } + + /** + * Fetch records that have console_messages_uri IN (values) + */ + public List fetchByConsoleMessagesUri(String... values) { + return fetch(OperatorExecutions.OPERATOR_EXECUTIONS.CONSOLE_MESSAGES_URI, values); + } +} diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/OperatorPortExecutionsDao.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/OperatorPortExecutionsDao.java new file mode 100644 index 00000000000..baec71793bd --- /dev/null +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/OperatorPortExecutionsDao.java @@ -0,0 +1,101 @@ +/* + * This file is generated by jOOQ. + */ +package edu.uci.ics.texera.dao.jooq.generated.tables.daos; + + +import edu.uci.ics.texera.dao.jooq.generated.tables.OperatorPortExecutions; +import edu.uci.ics.texera.dao.jooq.generated.tables.records.OperatorPortExecutionsRecord; + +import java.util.List; + +import org.jooq.Configuration; +import org.jooq.Record3; +import org.jooq.impl.DAOImpl; + + +/** + * This class is generated by jOOQ. + */ +@SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class OperatorPortExecutionsDao extends DAOImpl> { + + /** + * Create a new OperatorPortExecutionsDao without any configuration + */ + public OperatorPortExecutionsDao() { + super(OperatorPortExecutions.OPERATOR_PORT_EXECUTIONS, edu.uci.ics.texera.dao.jooq.generated.tables.pojos.OperatorPortExecutions.class); + } + + /** + * Create a new OperatorPortExecutionsDao with an attached configuration + */ + public OperatorPortExecutionsDao(Configuration configuration) { + super(OperatorPortExecutions.OPERATOR_PORT_EXECUTIONS, edu.uci.ics.texera.dao.jooq.generated.tables.pojos.OperatorPortExecutions.class, configuration); + } + + @Override + public Record3 getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.OperatorPortExecutions object) { + return compositeKeyRecord(object.getWorkflowExecutionId(), object.getOperatorId(), object.getPortId()); + } + + /** + * Fetch records that have workflow_execution_id BETWEEN + * lowerInclusive AND upperInclusive + */ + public List fetchRangeOfWorkflowExecutionId(Integer lowerInclusive, Integer upperInclusive) { + return fetchRange(OperatorPortExecutions.OPERATOR_PORT_EXECUTIONS.WORKFLOW_EXECUTION_ID, lowerInclusive, upperInclusive); + } + + /** + * Fetch records that have workflow_execution_id IN (values) + */ + public List fetchByWorkflowExecutionId(Integer... values) { + return fetch(OperatorPortExecutions.OPERATOR_PORT_EXECUTIONS.WORKFLOW_EXECUTION_ID, values); + } + + /** + * Fetch records that have operator_id BETWEEN lowerInclusive AND + * upperInclusive + */ + public List fetchRangeOfOperatorId(String lowerInclusive, String upperInclusive) { + return fetchRange(OperatorPortExecutions.OPERATOR_PORT_EXECUTIONS.OPERATOR_ID, lowerInclusive, upperInclusive); + } + + /** + * Fetch records that have operator_id IN (values) + */ + public List fetchByOperatorId(String... values) { + return fetch(OperatorPortExecutions.OPERATOR_PORT_EXECUTIONS.OPERATOR_ID, values); + } + + /** + * Fetch records that have port_id BETWEEN lowerInclusive AND + * upperInclusive + */ + public List fetchRangeOfPortId(Integer lowerInclusive, Integer upperInclusive) { + return fetchRange(OperatorPortExecutions.OPERATOR_PORT_EXECUTIONS.PORT_ID, lowerInclusive, upperInclusive); + } + + /** + * Fetch records that have port_id IN (values) + */ + public List fetchByPortId(Integer... values) { + return fetch(OperatorPortExecutions.OPERATOR_PORT_EXECUTIONS.PORT_ID, values); + } + + /** + * Fetch records that have result_uri BETWEEN lowerInclusive AND + * upperInclusive + */ + public List fetchRangeOfResultUri(String lowerInclusive, String upperInclusive) { + return fetchRange(OperatorPortExecutions.OPERATOR_PORT_EXECUTIONS.RESULT_URI, lowerInclusive, upperInclusive); + } + + /** + * Fetch records that have result_uri IN (values) + */ + public List fetchByResultUri(String... values) { + return fetch(OperatorPortExecutions.OPERATOR_PORT_EXECUTIONS.RESULT_URI, values); + } +} diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/ProjectDao.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/ProjectDao.java index 75ae6d60732..de946c18069 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/ProjectDao.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/ProjectDao.java @@ -9,17 +9,17 @@ import java.sql.Timestamp; import java.util.List; +import java.util.Optional; import org.jooq.Configuration; import org.jooq.impl.DAOImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class ProjectDao extends DAOImpl { +public class ProjectDao extends DAOImpl { /** * Create a new ProjectDao without any configuration @@ -36,33 +36,42 @@ public ProjectDao(Configuration configuration) { } @Override - public UInteger getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.Project object) { + public Integer getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.Project object) { return object.getPid(); } /** - * Fetch records that have pid BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have pid BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfPid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfPid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(Project.PROJECT.PID, lowerInclusive, upperInclusive); } /** * Fetch records that have pid IN (values) */ - public List fetchByPid(UInteger... values) { + public List fetchByPid(Integer... values) { return fetch(Project.PROJECT.PID, values); } /** * Fetch a unique record that has pid = value */ - public edu.uci.ics.texera.dao.jooq.generated.tables.pojos.Project fetchOneByPid(UInteger value) { + public edu.uci.ics.texera.dao.jooq.generated.tables.pojos.Project fetchOneByPid(Integer value) { return fetchOne(Project.PROJECT.PID, value); } /** - * Fetch records that have name BETWEEN lowerInclusive AND upperInclusive + * Fetch a unique record that has pid = value + */ + public Optional fetchOptionalByPid(Integer value) { + return fetchOptional(Project.PROJECT.PID, value); + } + + /** + * Fetch records that have name BETWEEN lowerInclusive AND + * upperInclusive */ public List fetchRangeOfName(String lowerInclusive, String upperInclusive) { return fetchRange(Project.PROJECT.NAME, lowerInclusive, upperInclusive); @@ -76,7 +85,8 @@ public List fetchByN } /** - * Fetch records that have description BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have description BETWEEN lowerInclusive AND + * upperInclusive */ public List fetchRangeOfDescription(String lowerInclusive, String upperInclusive) { return fetchRange(Project.PROJECT.DESCRIPTION, lowerInclusive, upperInclusive); @@ -90,21 +100,23 @@ public List fetchByD } /** - * Fetch records that have owner_id BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have owner_id BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfOwnerId(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfOwnerId(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(Project.PROJECT.OWNER_ID, lowerInclusive, upperInclusive); } /** * Fetch records that have owner_id IN (values) */ - public List fetchByOwnerId(UInteger... values) { + public List fetchByOwnerId(Integer... values) { return fetch(Project.PROJECT.OWNER_ID, values); } /** - * Fetch records that have creation_time BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have creation_time BETWEEN lowerInclusive AND + * upperInclusive */ public List fetchRangeOfCreationTime(Timestamp lowerInclusive, Timestamp upperInclusive) { return fetchRange(Project.PROJECT.CREATION_TIME, lowerInclusive, upperInclusive); @@ -118,7 +130,8 @@ public List fetchByC } /** - * Fetch records that have color BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have color BETWEEN lowerInclusive AND + * upperInclusive */ public List fetchRangeOfColor(String lowerInclusive, String upperInclusive) { return fetchRange(Project.PROJECT.COLOR, lowerInclusive, upperInclusive); diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/ProjectUserAccessDao.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/ProjectUserAccessDao.java index fddce2a8022..1cea5bbcd2c 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/ProjectUserAccessDao.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/ProjectUserAccessDao.java @@ -4,7 +4,7 @@ package edu.uci.ics.texera.dao.jooq.generated.tables.daos; -import edu.uci.ics.texera.dao.jooq.generated.enums.ProjectUserAccessPrivilege; +import edu.uci.ics.texera.dao.jooq.generated.enums.PrivilegeEnum; import edu.uci.ics.texera.dao.jooq.generated.tables.ProjectUserAccess; import edu.uci.ics.texera.dao.jooq.generated.tables.records.ProjectUserAccessRecord; @@ -13,14 +13,13 @@ import org.jooq.Configuration; import org.jooq.Record2; import org.jooq.impl.DAOImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class ProjectUserAccessDao extends DAOImpl> { +public class ProjectUserAccessDao extends DAOImpl> { /** * Create a new ProjectUserAccessDao without any configuration @@ -37,49 +36,52 @@ public ProjectUserAccessDao(Configuration configuration) { } @Override - public Record2 getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.ProjectUserAccess object) { + public Record2 getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.ProjectUserAccess object) { return compositeKeyRecord(object.getUid(), object.getPid()); } /** - * Fetch records that have uid BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have uid BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfUid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfUid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(ProjectUserAccess.PROJECT_USER_ACCESS.UID, lowerInclusive, upperInclusive); } /** * Fetch records that have uid IN (values) */ - public List fetchByUid(UInteger... values) { + public List fetchByUid(Integer... values) { return fetch(ProjectUserAccess.PROJECT_USER_ACCESS.UID, values); } /** - * Fetch records that have pid BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have pid BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfPid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfPid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(ProjectUserAccess.PROJECT_USER_ACCESS.PID, lowerInclusive, upperInclusive); } /** * Fetch records that have pid IN (values) */ - public List fetchByPid(UInteger... values) { + public List fetchByPid(Integer... values) { return fetch(ProjectUserAccess.PROJECT_USER_ACCESS.PID, values); } /** - * Fetch records that have privilege BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have privilege BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfPrivilege(ProjectUserAccessPrivilege lowerInclusive, ProjectUserAccessPrivilege upperInclusive) { + public List fetchRangeOfPrivilege(PrivilegeEnum lowerInclusive, PrivilegeEnum upperInclusive) { return fetchRange(ProjectUserAccess.PROJECT_USER_ACCESS.PRIVILEGE, lowerInclusive, upperInclusive); } /** * Fetch records that have privilege IN (values) */ - public List fetchByPrivilege(ProjectUserAccessPrivilege... values) { + public List fetchByPrivilege(PrivilegeEnum... values) { return fetch(ProjectUserAccess.PROJECT_USER_ACCESS.PRIVILEGE, values); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/PublicProjectDao.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/PublicProjectDao.java index 884133f1d3c..838f6691d93 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/PublicProjectDao.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/PublicProjectDao.java @@ -8,17 +8,17 @@ import edu.uci.ics.texera.dao.jooq.generated.tables.records.PublicProjectRecord; import java.util.List; +import java.util.Optional; import org.jooq.Configuration; import org.jooq.impl.DAOImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class PublicProjectDao extends DAOImpl { +public class PublicProjectDao extends DAOImpl { /** * Create a new PublicProjectDao without any configuration @@ -35,42 +35,51 @@ public PublicProjectDao(Configuration configuration) { } @Override - public UInteger getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.PublicProject object) { + public Integer getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.PublicProject object) { return object.getPid(); } /** - * Fetch records that have pid BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have pid BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfPid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfPid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(PublicProject.PUBLIC_PROJECT.PID, lowerInclusive, upperInclusive); } /** * Fetch records that have pid IN (values) */ - public List fetchByPid(UInteger... values) { + public List fetchByPid(Integer... values) { return fetch(PublicProject.PUBLIC_PROJECT.PID, values); } /** * Fetch a unique record that has pid = value */ - public edu.uci.ics.texera.dao.jooq.generated.tables.pojos.PublicProject fetchOneByPid(UInteger value) { + public edu.uci.ics.texera.dao.jooq.generated.tables.pojos.PublicProject fetchOneByPid(Integer value) { return fetchOne(PublicProject.PUBLIC_PROJECT.PID, value); } /** - * Fetch records that have uid BETWEEN lowerInclusive AND upperInclusive + * Fetch a unique record that has pid = value + */ + public Optional fetchOptionalByPid(Integer value) { + return fetchOptional(PublicProject.PUBLIC_PROJECT.PID, value); + } + + /** + * Fetch records that have uid BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfUid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfUid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(PublicProject.PUBLIC_PROJECT.UID, lowerInclusive, upperInclusive); } /** * Fetch records that have uid IN (values) */ - public List fetchByUid(UInteger... values) { + public List fetchByUid(Integer... values) { return fetch(PublicProject.PUBLIC_PROJECT.UID, values); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/UserConfigDao.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/UserConfigDao.java index 7e24262d35a..b48cca15e3e 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/UserConfigDao.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/UserConfigDao.java @@ -12,14 +12,13 @@ import org.jooq.Configuration; import org.jooq.Record2; import org.jooq.impl.DAOImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class UserConfigDao extends DAOImpl> { +public class UserConfigDao extends DAOImpl> { /** * Create a new UserConfigDao without any configuration @@ -36,26 +35,28 @@ public UserConfigDao(Configuration configuration) { } @Override - public Record2 getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.UserConfig object) { + public Record2 getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.UserConfig object) { return compositeKeyRecord(object.getUid(), object.getKey()); } /** - * Fetch records that have uid BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have uid BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfUid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfUid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(UserConfig.USER_CONFIG.UID, lowerInclusive, upperInclusive); } /** * Fetch records that have uid IN (values) */ - public List fetchByUid(UInteger... values) { + public List fetchByUid(Integer... values) { return fetch(UserConfig.USER_CONFIG.UID, values); } /** - * Fetch records that have key BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have key BETWEEN lowerInclusive AND + * upperInclusive */ public List fetchRangeOfKey(String lowerInclusive, String upperInclusive) { return fetchRange(UserConfig.USER_CONFIG.KEY, lowerInclusive, upperInclusive); @@ -69,7 +70,8 @@ public List fetch } /** - * Fetch records that have value BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have value BETWEEN lowerInclusive AND + * upperInclusive */ public List fetchRangeOfValue(String lowerInclusive, String upperInclusive) { return fetchRange(UserConfig.USER_CONFIG.VALUE, lowerInclusive, upperInclusive); diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/UserDao.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/UserDao.java index 4cc3bdd759c..034062bd979 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/UserDao.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/UserDao.java @@ -4,22 +4,22 @@ package edu.uci.ics.texera.dao.jooq.generated.tables.daos; -import edu.uci.ics.texera.dao.jooq.generated.enums.UserRole; +import edu.uci.ics.texera.dao.jooq.generated.enums.UserRoleEnum; import edu.uci.ics.texera.dao.jooq.generated.tables.User; import edu.uci.ics.texera.dao.jooq.generated.tables.records.UserRecord; import java.util.List; +import java.util.Optional; import org.jooq.Configuration; import org.jooq.impl.DAOImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class UserDao extends DAOImpl { +public class UserDao extends DAOImpl { /** * Create a new UserDao without any configuration @@ -36,33 +36,42 @@ public UserDao(Configuration configuration) { } @Override - public UInteger getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.User object) { + public Integer getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.User object) { return object.getUid(); } /** - * Fetch records that have uid BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have uid BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfUid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfUid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(User.USER.UID, lowerInclusive, upperInclusive); } /** * Fetch records that have uid IN (values) */ - public List fetchByUid(UInteger... values) { + public List fetchByUid(Integer... values) { return fetch(User.USER.UID, values); } /** * Fetch a unique record that has uid = value */ - public edu.uci.ics.texera.dao.jooq.generated.tables.pojos.User fetchOneByUid(UInteger value) { + public edu.uci.ics.texera.dao.jooq.generated.tables.pojos.User fetchOneByUid(Integer value) { return fetchOne(User.USER.UID, value); } /** - * Fetch records that have name BETWEEN lowerInclusive AND upperInclusive + * Fetch a unique record that has uid = value + */ + public Optional fetchOptionalByUid(Integer value) { + return fetchOptional(User.USER.UID, value); + } + + /** + * Fetch records that have name BETWEEN lowerInclusive AND + * upperInclusive */ public List fetchRangeOfName(String lowerInclusive, String upperInclusive) { return fetchRange(User.USER.NAME, lowerInclusive, upperInclusive); @@ -76,7 +85,8 @@ public List fetchByName } /** - * Fetch records that have email BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have email BETWEEN lowerInclusive AND + * upperInclusive */ public List fetchRangeOfEmail(String lowerInclusive, String upperInclusive) { return fetchRange(User.USER.EMAIL, lowerInclusive, upperInclusive); @@ -97,7 +107,15 @@ public edu.uci.ics.texera.dao.jooq.generated.tables.pojos.User fetchOneByEmail(S } /** - * Fetch records that have password BETWEEN lowerInclusive AND upperInclusive + * Fetch a unique record that has email = value + */ + public Optional fetchOptionalByEmail(String value) { + return fetchOptional(User.USER.EMAIL, value); + } + + /** + * Fetch records that have password BETWEEN lowerInclusive AND + * upperInclusive */ public List fetchRangeOfPassword(String lowerInclusive, String upperInclusive) { return fetchRange(User.USER.PASSWORD, lowerInclusive, upperInclusive); @@ -111,7 +129,8 @@ public List fetchByPass } /** - * Fetch records that have google_id BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have google_id BETWEEN lowerInclusive AND + * upperInclusive */ public List fetchRangeOfGoogleId(String lowerInclusive, String upperInclusive) { return fetchRange(User.USER.GOOGLE_ID, lowerInclusive, upperInclusive); @@ -132,21 +151,15 @@ public edu.uci.ics.texera.dao.jooq.generated.tables.pojos.User fetchOneByGoogleI } /** - * Fetch records that have role BETWEEN lowerInclusive AND upperInclusive - */ - public List fetchRangeOfRole(UserRole lowerInclusive, UserRole upperInclusive) { - return fetchRange(User.USER.ROLE, lowerInclusive, upperInclusive); - } - - /** - * Fetch records that have role IN (values) + * Fetch a unique record that has google_id = value */ - public List fetchByRole(UserRole... values) { - return fetch(User.USER.ROLE, values); + public Optional fetchOptionalByGoogleId(String value) { + return fetchOptional(User.USER.GOOGLE_ID, value); } /** - * Fetch records that have google_avatar BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have google_avatar BETWEEN lowerInclusive AND + * upperInclusive */ public List fetchRangeOfGoogleAvatar(String lowerInclusive, String upperInclusive) { return fetchRange(User.USER.GOOGLE_AVATAR, lowerInclusive, upperInclusive); @@ -158,4 +171,19 @@ public List fetchRangeO public List fetchByGoogleAvatar(String... values) { return fetch(User.USER.GOOGLE_AVATAR, values); } + + /** + * Fetch records that have role BETWEEN lowerInclusive AND + * upperInclusive + */ + public List fetchRangeOfRole(UserRoleEnum lowerInclusive, UserRoleEnum upperInclusive) { + return fetchRange(User.USER.ROLE, lowerInclusive, upperInclusive); + } + + /** + * Fetch records that have role IN (values) + */ + public List fetchByRole(UserRoleEnum... values) { + return fetch(User.USER.ROLE, values); + } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowDao.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowDao.java index a17088023ee..1f6a5916029 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowDao.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowDao.java @@ -9,17 +9,17 @@ import java.sql.Timestamp; import java.util.List; +import java.util.Optional; import org.jooq.Configuration; import org.jooq.impl.DAOImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class WorkflowDao extends DAOImpl { +public class WorkflowDao extends DAOImpl { /** * Create a new WorkflowDao without any configuration @@ -36,61 +36,72 @@ public WorkflowDao(Configuration configuration) { } @Override - public UInteger getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.Workflow object) { + public Integer getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.Workflow object) { return object.getWid(); } /** - * Fetch records that have name BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have wid BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfName(String lowerInclusive, String upperInclusive) { - return fetchRange(Workflow.WORKFLOW.NAME, lowerInclusive, upperInclusive); + public List fetchRangeOfWid(Integer lowerInclusive, Integer upperInclusive) { + return fetchRange(Workflow.WORKFLOW.WID, lowerInclusive, upperInclusive); } /** - * Fetch records that have name IN (values) + * Fetch records that have wid IN (values) */ - public List fetchByName(String... values) { - return fetch(Workflow.WORKFLOW.NAME, values); + public List fetchByWid(Integer... values) { + return fetch(Workflow.WORKFLOW.WID, values); } /** - * Fetch records that have description BETWEEN lowerInclusive AND upperInclusive + * Fetch a unique record that has wid = value */ - public List fetchRangeOfDescription(String lowerInclusive, String upperInclusive) { - return fetchRange(Workflow.WORKFLOW.DESCRIPTION, lowerInclusive, upperInclusive); + public edu.uci.ics.texera.dao.jooq.generated.tables.pojos.Workflow fetchOneByWid(Integer value) { + return fetchOne(Workflow.WORKFLOW.WID, value); } /** - * Fetch records that have description IN (values) + * Fetch a unique record that has wid = value */ - public List fetchByDescription(String... values) { - return fetch(Workflow.WORKFLOW.DESCRIPTION, values); + public Optional fetchOptionalByWid(Integer value) { + return fetchOptional(Workflow.WORKFLOW.WID, value); } /** - * Fetch records that have wid BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have name BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfWid(UInteger lowerInclusive, UInteger upperInclusive) { - return fetchRange(Workflow.WORKFLOW.WID, lowerInclusive, upperInclusive); + public List fetchRangeOfName(String lowerInclusive, String upperInclusive) { + return fetchRange(Workflow.WORKFLOW.NAME, lowerInclusive, upperInclusive); } /** - * Fetch records that have wid IN (values) + * Fetch records that have name IN (values) */ - public List fetchByWid(UInteger... values) { - return fetch(Workflow.WORKFLOW.WID, values); + public List fetchByName(String... values) { + return fetch(Workflow.WORKFLOW.NAME, values); } /** - * Fetch a unique record that has wid = value + * Fetch records that have description BETWEEN lowerInclusive AND + * upperInclusive */ - public edu.uci.ics.texera.dao.jooq.generated.tables.pojos.Workflow fetchOneByWid(UInteger value) { - return fetchOne(Workflow.WORKFLOW.WID, value); + public List fetchRangeOfDescription(String lowerInclusive, String upperInclusive) { + return fetchRange(Workflow.WORKFLOW.DESCRIPTION, lowerInclusive, upperInclusive); + } + + /** + * Fetch records that have description IN (values) + */ + public List fetchByDescription(String... values) { + return fetch(Workflow.WORKFLOW.DESCRIPTION, values); } /** - * Fetch records that have content BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have content BETWEEN lowerInclusive AND + * upperInclusive */ public List fetchRangeOfContent(String lowerInclusive, String upperInclusive) { return fetchRange(Workflow.WORKFLOW.CONTENT, lowerInclusive, upperInclusive); @@ -104,7 +115,8 @@ public List fetchBy } /** - * Fetch records that have creation_time BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have creation_time BETWEEN lowerInclusive AND + * upperInclusive */ public List fetchRangeOfCreationTime(Timestamp lowerInclusive, Timestamp upperInclusive) { return fetchRange(Workflow.WORKFLOW.CREATION_TIME, lowerInclusive, upperInclusive); @@ -118,7 +130,8 @@ public List fetchBy } /** - * Fetch records that have last_modified_time BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have last_modified_time BETWEEN lowerInclusive + * AND upperInclusive */ public List fetchRangeOfLastModifiedTime(Timestamp lowerInclusive, Timestamp upperInclusive) { return fetchRange(Workflow.WORKFLOW.LAST_MODIFIED_TIME, lowerInclusive, upperInclusive); @@ -132,16 +145,17 @@ public List fetchBy } /** - * Fetch records that have is_public BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have is_public BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfIsPublic(Byte lowerInclusive, Byte upperInclusive) { + public List fetchRangeOfIsPublic(Boolean lowerInclusive, Boolean upperInclusive) { return fetchRange(Workflow.WORKFLOW.IS_PUBLIC, lowerInclusive, upperInclusive); } /** * Fetch records that have is_public IN (values) */ - public List fetchByIsPublic(Byte... values) { + public List fetchByIsPublic(Boolean... values) { return fetch(Workflow.WORKFLOW.IS_PUBLIC, values); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowExecutionsDao.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowExecutionsDao.java index 1d5c908d29c..7ecc79ee04a 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowExecutionsDao.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowExecutionsDao.java @@ -9,17 +9,17 @@ import java.sql.Timestamp; import java.util.List; +import java.util.Optional; import org.jooq.Configuration; import org.jooq.impl.DAOImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class WorkflowExecutionsDao extends DAOImpl { +public class WorkflowExecutionsDao extends DAOImpl { /** * Create a new WorkflowExecutionsDao without any configuration @@ -36,75 +36,87 @@ public WorkflowExecutionsDao(Configuration configuration) { } @Override - public UInteger getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowExecutions object) { + public Integer getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowExecutions object) { return object.getEid(); } /** - * Fetch records that have eid BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have eid BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfEid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfEid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(WorkflowExecutions.WORKFLOW_EXECUTIONS.EID, lowerInclusive, upperInclusive); } /** * Fetch records that have eid IN (values) */ - public List fetchByEid(UInteger... values) { + public List fetchByEid(Integer... values) { return fetch(WorkflowExecutions.WORKFLOW_EXECUTIONS.EID, values); } /** * Fetch a unique record that has eid = value */ - public edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowExecutions fetchOneByEid(UInteger value) { + public edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowExecutions fetchOneByEid(Integer value) { return fetchOne(WorkflowExecutions.WORKFLOW_EXECUTIONS.EID, value); } /** - * Fetch records that have vid BETWEEN lowerInclusive AND upperInclusive + * Fetch a unique record that has eid = value + */ + public Optional fetchOptionalByEid(Integer value) { + return fetchOptional(WorkflowExecutions.WORKFLOW_EXECUTIONS.EID, value); + } + + /** + * Fetch records that have vid BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfVid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfVid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(WorkflowExecutions.WORKFLOW_EXECUTIONS.VID, lowerInclusive, upperInclusive); } /** * Fetch records that have vid IN (values) */ - public List fetchByVid(UInteger... values) { + public List fetchByVid(Integer... values) { return fetch(WorkflowExecutions.WORKFLOW_EXECUTIONS.VID, values); } /** - * Fetch records that have uid BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have uid BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfUid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfUid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(WorkflowExecutions.WORKFLOW_EXECUTIONS.UID, lowerInclusive, upperInclusive); } /** * Fetch records that have uid IN (values) */ - public List fetchByUid(UInteger... values) { + public List fetchByUid(Integer... values) { return fetch(WorkflowExecutions.WORKFLOW_EXECUTIONS.UID, values); } /** - * Fetch records that have status BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have status BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfStatus(Byte lowerInclusive, Byte upperInclusive) { + public List fetchRangeOfStatus(Short lowerInclusive, Short upperInclusive) { return fetchRange(WorkflowExecutions.WORKFLOW_EXECUTIONS.STATUS, lowerInclusive, upperInclusive); } /** * Fetch records that have status IN (values) */ - public List fetchByStatus(Byte... values) { + public List fetchByStatus(Short... values) { return fetch(WorkflowExecutions.WORKFLOW_EXECUTIONS.STATUS, values); } /** - * Fetch records that have result BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have result BETWEEN lowerInclusive AND + * upperInclusive */ public List fetchRangeOfResult(String lowerInclusive, String upperInclusive) { return fetchRange(WorkflowExecutions.WORKFLOW_EXECUTIONS.RESULT, lowerInclusive, upperInclusive); @@ -118,7 +130,8 @@ public Liststarting_time BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have starting_time BETWEEN lowerInclusive AND + * upperInclusive */ public List fetchRangeOfStartingTime(Timestamp lowerInclusive, Timestamp upperInclusive) { return fetchRange(WorkflowExecutions.WORKFLOW_EXECUTIONS.STARTING_TIME, lowerInclusive, upperInclusive); @@ -132,7 +145,8 @@ public Listlast_update_time BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have last_update_time BETWEEN lowerInclusive AND + * upperInclusive */ public List fetchRangeOfLastUpdateTime(Timestamp lowerInclusive, Timestamp upperInclusive) { return fetchRange(WorkflowExecutions.WORKFLOW_EXECUTIONS.LAST_UPDATE_TIME, lowerInclusive, upperInclusive); @@ -146,21 +160,23 @@ public Listbookmarked BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have bookmarked BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfBookmarked(Byte lowerInclusive, Byte upperInclusive) { + public List fetchRangeOfBookmarked(Boolean lowerInclusive, Boolean upperInclusive) { return fetchRange(WorkflowExecutions.WORKFLOW_EXECUTIONS.BOOKMARKED, lowerInclusive, upperInclusive); } /** * Fetch records that have bookmarked IN (values) */ - public List fetchByBookmarked(Byte... values) { + public List fetchByBookmarked(Boolean... values) { return fetch(WorkflowExecutions.WORKFLOW_EXECUTIONS.BOOKMARKED, values); } /** - * Fetch records that have name BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have name BETWEEN lowerInclusive AND + * upperInclusive */ public List fetchRangeOfName(String lowerInclusive, String upperInclusive) { return fetchRange(WorkflowExecutions.WORKFLOW_EXECUTIONS.NAME, lowerInclusive, upperInclusive); @@ -174,7 +190,8 @@ public Listenvironment_version BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have environment_version BETWEEN lowerInclusive + * AND upperInclusive */ public List fetchRangeOfEnvironmentVersion(String lowerInclusive, String upperInclusive) { return fetchRange(WorkflowExecutions.WORKFLOW_EXECUTIONS.ENVIRONMENT_VERSION, lowerInclusive, upperInclusive); @@ -188,7 +205,8 @@ public Listlog_location BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have log_location BETWEEN lowerInclusive AND + * upperInclusive */ public List fetchRangeOfLogLocation(String lowerInclusive, String upperInclusive) { return fetchRange(WorkflowExecutions.WORKFLOW_EXECUTIONS.LOG_LOCATION, lowerInclusive, upperInclusive); @@ -202,7 +220,8 @@ public Listruntime_stats_uri BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have runtime_stats_uri BETWEEN lowerInclusive + * AND upperInclusive */ public List fetchRangeOfRuntimeStatsUri(String lowerInclusive, String upperInclusive) { return fetchRange(WorkflowExecutions.WORKFLOW_EXECUTIONS.RUNTIME_STATS_URI, lowerInclusive, upperInclusive); diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowOfProjectDao.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowOfProjectDao.java index fae51c8553e..23bbb8a890f 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowOfProjectDao.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowOfProjectDao.java @@ -12,14 +12,13 @@ import org.jooq.Configuration; import org.jooq.Record2; import org.jooq.impl.DAOImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class WorkflowOfProjectDao extends DAOImpl> { +public class WorkflowOfProjectDao extends DAOImpl> { /** * Create a new WorkflowOfProjectDao without any configuration @@ -36,35 +35,37 @@ public WorkflowOfProjectDao(Configuration configuration) { } @Override - public Record2 getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowOfProject object) { + public Record2 getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowOfProject object) { return compositeKeyRecord(object.getWid(), object.getPid()); } /** - * Fetch records that have wid BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have wid BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfWid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfWid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(WorkflowOfProject.WORKFLOW_OF_PROJECT.WID, lowerInclusive, upperInclusive); } /** * Fetch records that have wid IN (values) */ - public List fetchByWid(UInteger... values) { + public List fetchByWid(Integer... values) { return fetch(WorkflowOfProject.WORKFLOW_OF_PROJECT.WID, values); } /** - * Fetch records that have pid BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have pid BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfPid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfPid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(WorkflowOfProject.WORKFLOW_OF_PROJECT.PID, lowerInclusive, upperInclusive); } /** * Fetch records that have pid IN (values) */ - public List fetchByPid(UInteger... values) { + public List fetchByPid(Integer... values) { return fetch(WorkflowOfProject.WORKFLOW_OF_PROJECT.PID, values); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowOfUserDao.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowOfUserDao.java index 75bcedf31f4..2dd9d25b437 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowOfUserDao.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowOfUserDao.java @@ -12,14 +12,13 @@ import org.jooq.Configuration; import org.jooq.Record2; import org.jooq.impl.DAOImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class WorkflowOfUserDao extends DAOImpl> { +public class WorkflowOfUserDao extends DAOImpl> { /** * Create a new WorkflowOfUserDao without any configuration @@ -36,35 +35,37 @@ public WorkflowOfUserDao(Configuration configuration) { } @Override - public Record2 getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowOfUser object) { + public Record2 getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowOfUser object) { return compositeKeyRecord(object.getUid(), object.getWid()); } /** - * Fetch records that have uid BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have uid BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfUid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfUid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(WorkflowOfUser.WORKFLOW_OF_USER.UID, lowerInclusive, upperInclusive); } /** * Fetch records that have uid IN (values) */ - public List fetchByUid(UInteger... values) { + public List fetchByUid(Integer... values) { return fetch(WorkflowOfUser.WORKFLOW_OF_USER.UID, values); } /** - * Fetch records that have wid BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have wid BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfWid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfWid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(WorkflowOfUser.WORKFLOW_OF_USER.WID, lowerInclusive, upperInclusive); } /** * Fetch records that have wid IN (values) */ - public List fetchByWid(UInteger... values) { + public List fetchByWid(Integer... values) { return fetch(WorkflowOfUser.WORKFLOW_OF_USER.WID, values); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowUserAccessDao.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowUserAccessDao.java index a0dd0d35d1a..ae63a7ab568 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowUserAccessDao.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowUserAccessDao.java @@ -4,7 +4,7 @@ package edu.uci.ics.texera.dao.jooq.generated.tables.daos; -import edu.uci.ics.texera.dao.jooq.generated.enums.WorkflowUserAccessPrivilege; +import edu.uci.ics.texera.dao.jooq.generated.enums.PrivilegeEnum; import edu.uci.ics.texera.dao.jooq.generated.tables.WorkflowUserAccess; import edu.uci.ics.texera.dao.jooq.generated.tables.records.WorkflowUserAccessRecord; @@ -13,14 +13,13 @@ import org.jooq.Configuration; import org.jooq.Record2; import org.jooq.impl.DAOImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class WorkflowUserAccessDao extends DAOImpl> { +public class WorkflowUserAccessDao extends DAOImpl> { /** * Create a new WorkflowUserAccessDao without any configuration @@ -37,49 +36,52 @@ public WorkflowUserAccessDao(Configuration configuration) { } @Override - public Record2 getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowUserAccess object) { + public Record2 getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowUserAccess object) { return compositeKeyRecord(object.getUid(), object.getWid()); } /** - * Fetch records that have uid BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have uid BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfUid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfUid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(WorkflowUserAccess.WORKFLOW_USER_ACCESS.UID, lowerInclusive, upperInclusive); } /** * Fetch records that have uid IN (values) */ - public List fetchByUid(UInteger... values) { + public List fetchByUid(Integer... values) { return fetch(WorkflowUserAccess.WORKFLOW_USER_ACCESS.UID, values); } /** - * Fetch records that have wid BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have wid BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfWid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfWid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(WorkflowUserAccess.WORKFLOW_USER_ACCESS.WID, lowerInclusive, upperInclusive); } /** * Fetch records that have wid IN (values) */ - public List fetchByWid(UInteger... values) { + public List fetchByWid(Integer... values) { return fetch(WorkflowUserAccess.WORKFLOW_USER_ACCESS.WID, values); } /** - * Fetch records that have privilege BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have privilege BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfPrivilege(WorkflowUserAccessPrivilege lowerInclusive, WorkflowUserAccessPrivilege upperInclusive) { + public List fetchRangeOfPrivilege(PrivilegeEnum lowerInclusive, PrivilegeEnum upperInclusive) { return fetchRange(WorkflowUserAccess.WORKFLOW_USER_ACCESS.PRIVILEGE, lowerInclusive, upperInclusive); } /** * Fetch records that have privilege IN (values) */ - public List fetchByPrivilege(WorkflowUserAccessPrivilege... values) { + public List fetchByPrivilege(PrivilegeEnum... values) { return fetch(WorkflowUserAccess.WORKFLOW_USER_ACCESS.PRIVILEGE, values); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowUserClonesDao.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowUserClonesDao.java index ce65b197454..d9f475ee37e 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowUserClonesDao.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowUserClonesDao.java @@ -12,14 +12,13 @@ import org.jooq.Configuration; import org.jooq.Record2; import org.jooq.impl.DAOImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class WorkflowUserClonesDao extends DAOImpl> { +public class WorkflowUserClonesDao extends DAOImpl> { /** * Create a new WorkflowUserClonesDao without any configuration @@ -36,35 +35,37 @@ public WorkflowUserClonesDao(Configuration configuration) { } @Override - public Record2 getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowUserClones object) { + public Record2 getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowUserClones object) { return compositeKeyRecord(object.getUid(), object.getWid()); } /** - * Fetch records that have uid BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have uid BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfUid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfUid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(WorkflowUserClones.WORKFLOW_USER_CLONES.UID, lowerInclusive, upperInclusive); } /** * Fetch records that have uid IN (values) */ - public List fetchByUid(UInteger... values) { + public List fetchByUid(Integer... values) { return fetch(WorkflowUserClones.WORKFLOW_USER_CLONES.UID, values); } /** - * Fetch records that have wid BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have wid BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfWid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfWid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(WorkflowUserClones.WORKFLOW_USER_CLONES.WID, lowerInclusive, upperInclusive); } /** * Fetch records that have wid IN (values) */ - public List fetchByWid(UInteger... values) { + public List fetchByWid(Integer... values) { return fetch(WorkflowUserClones.WORKFLOW_USER_CLONES.WID, values); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowUserLikesDao.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowUserLikesDao.java index 318dfa55c79..dbf9002ee43 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowUserLikesDao.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowUserLikesDao.java @@ -12,14 +12,13 @@ import org.jooq.Configuration; import org.jooq.Record2; import org.jooq.impl.DAOImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class WorkflowUserLikesDao extends DAOImpl> { +public class WorkflowUserLikesDao extends DAOImpl> { /** * Create a new WorkflowUserLikesDao without any configuration @@ -36,35 +35,37 @@ public WorkflowUserLikesDao(Configuration configuration) { } @Override - public Record2 getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowUserLikes object) { + public Record2 getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowUserLikes object) { return compositeKeyRecord(object.getUid(), object.getWid()); } /** - * Fetch records that have uid BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have uid BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfUid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfUid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(WorkflowUserLikes.WORKFLOW_USER_LIKES.UID, lowerInclusive, upperInclusive); } /** * Fetch records that have uid IN (values) */ - public List fetchByUid(UInteger... values) { + public List fetchByUid(Integer... values) { return fetch(WorkflowUserLikes.WORKFLOW_USER_LIKES.UID, values); } /** - * Fetch records that have wid BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have wid BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfWid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfWid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(WorkflowUserLikes.WORKFLOW_USER_LIKES.WID, lowerInclusive, upperInclusive); } /** * Fetch records that have wid IN (values) */ - public List fetchByWid(UInteger... values) { + public List fetchByWid(Integer... values) { return fetch(WorkflowUserLikes.WORKFLOW_USER_LIKES.WID, values); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowVersionDao.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowVersionDao.java index 701492f4df0..dca0511b733 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowVersionDao.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowVersionDao.java @@ -9,17 +9,17 @@ import java.sql.Timestamp; import java.util.List; +import java.util.Optional; import org.jooq.Configuration; import org.jooq.impl.DAOImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class WorkflowVersionDao extends DAOImpl { +public class WorkflowVersionDao extends DAOImpl { /** * Create a new WorkflowVersionDao without any configuration @@ -36,47 +36,57 @@ public WorkflowVersionDao(Configuration configuration) { } @Override - public UInteger getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowVersion object) { + public Integer getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowVersion object) { return object.getVid(); } /** - * Fetch records that have vid BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have vid BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfVid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfVid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(WorkflowVersion.WORKFLOW_VERSION.VID, lowerInclusive, upperInclusive); } /** * Fetch records that have vid IN (values) */ - public List fetchByVid(UInteger... values) { + public List fetchByVid(Integer... values) { return fetch(WorkflowVersion.WORKFLOW_VERSION.VID, values); } /** * Fetch a unique record that has vid = value */ - public edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowVersion fetchOneByVid(UInteger value) { + public edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowVersion fetchOneByVid(Integer value) { return fetchOne(WorkflowVersion.WORKFLOW_VERSION.VID, value); } /** - * Fetch records that have wid BETWEEN lowerInclusive AND upperInclusive + * Fetch a unique record that has vid = value + */ + public Optional fetchOptionalByVid(Integer value) { + return fetchOptional(WorkflowVersion.WORKFLOW_VERSION.VID, value); + } + + /** + * Fetch records that have wid BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfWid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfWid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(WorkflowVersion.WORKFLOW_VERSION.WID, lowerInclusive, upperInclusive); } /** * Fetch records that have wid IN (values) */ - public List fetchByWid(UInteger... values) { + public List fetchByWid(Integer... values) { return fetch(WorkflowVersion.WORKFLOW_VERSION.WID, values); } /** - * Fetch records that have content BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have content BETWEEN lowerInclusive AND + * upperInclusive */ public List fetchRangeOfContent(String lowerInclusive, String upperInclusive) { return fetchRange(WorkflowVersion.WORKFLOW_VERSION.CONTENT, lowerInclusive, upperInclusive); @@ -90,7 +100,8 @@ public List } /** - * Fetch records that have creation_time BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have creation_time BETWEEN lowerInclusive AND + * upperInclusive */ public List fetchRangeOfCreationTime(Timestamp lowerInclusive, Timestamp upperInclusive) { return fetchRange(WorkflowVersion.WORKFLOW_VERSION.CREATION_TIME, lowerInclusive, upperInclusive); diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowViewCountDao.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowViewCountDao.java index d6a4a681967..81f006163b6 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowViewCountDao.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/daos/WorkflowViewCountDao.java @@ -8,17 +8,17 @@ import edu.uci.ics.texera.dao.jooq.generated.tables.records.WorkflowViewCountRecord; import java.util.List; +import java.util.Optional; import org.jooq.Configuration; import org.jooq.impl.DAOImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class WorkflowViewCountDao extends DAOImpl { +public class WorkflowViewCountDao extends DAOImpl { /** * Create a new WorkflowViewCountDao without any configuration @@ -35,42 +35,51 @@ public WorkflowViewCountDao(Configuration configuration) { } @Override - public UInteger getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowViewCount object) { + public Integer getId(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowViewCount object) { return object.getWid(); } /** - * Fetch records that have wid BETWEEN lowerInclusive AND upperInclusive + * Fetch records that have wid BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfWid(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfWid(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(WorkflowViewCount.WORKFLOW_VIEW_COUNT.WID, lowerInclusive, upperInclusive); } /** * Fetch records that have wid IN (values) */ - public List fetchByWid(UInteger... values) { + public List fetchByWid(Integer... values) { return fetch(WorkflowViewCount.WORKFLOW_VIEW_COUNT.WID, values); } /** * Fetch a unique record that has wid = value */ - public edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowViewCount fetchOneByWid(UInteger value) { + public edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowViewCount fetchOneByWid(Integer value) { return fetchOne(WorkflowViewCount.WORKFLOW_VIEW_COUNT.WID, value); } /** - * Fetch records that have view_count BETWEEN lowerInclusive AND upperInclusive + * Fetch a unique record that has wid = value + */ + public Optional fetchOptionalByWid(Integer value) { + return fetchOptional(WorkflowViewCount.WORKFLOW_VIEW_COUNT.WID, value); + } + + /** + * Fetch records that have view_count BETWEEN lowerInclusive AND + * upperInclusive */ - public List fetchRangeOfViewCount(UInteger lowerInclusive, UInteger upperInclusive) { + public List fetchRangeOfViewCount(Integer lowerInclusive, Integer upperInclusive) { return fetchRange(WorkflowViewCount.WORKFLOW_VIEW_COUNT.VIEW_COUNT, lowerInclusive, upperInclusive); } /** * Fetch records that have view_count IN (values) */ - public List fetchByViewCount(UInteger... values) { + public List fetchByViewCount(Integer... values) { return fetch(WorkflowViewCount.WORKFLOW_VIEW_COUNT.VIEW_COUNT, values); } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IDataset.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IDataset.java index 474d8e8d887..762454ca331 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IDataset.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IDataset.java @@ -7,8 +7,6 @@ import java.io.Serializable; import java.sql.Timestamp; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -19,22 +17,22 @@ public interface IDataset extends Serializable { /** * Setter for texera_db.dataset.did. */ - public void setDid(UInteger value); + public void setDid(Integer value); /** * Getter for texera_db.dataset.did. */ - public UInteger getDid(); + public Integer getDid(); /** * Setter for texera_db.dataset.owner_uid. */ - public void setOwnerUid(UInteger value); + public void setOwnerUid(Integer value); /** * Getter for texera_db.dataset.owner_uid. */ - public UInteger getOwnerUid(); + public Integer getOwnerUid(); /** * Setter for texera_db.dataset.name. @@ -49,12 +47,12 @@ public interface IDataset extends Serializable { /** * Setter for texera_db.dataset.is_public. */ - public void setIsPublic(Byte value); + public void setIsPublic(Boolean value); /** * Getter for texera_db.dataset.is_public. */ - public Byte getIsPublic(); + public Boolean getIsPublic(); /** * Setter for texera_db.dataset.description. @@ -81,12 +79,14 @@ public interface IDataset extends Serializable { // ------------------------------------------------------------------------- /** - * Load data from another generated Record/POJO implementing the common interface IDataset + * Load data from another generated Record/POJO implementing the common + * interface IDataset */ - public void from(edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IDataset from); + public void from(IDataset from); /** - * Copy data into another generated Record/POJO implementing the common interface IDataset + * Copy data into another generated Record/POJO implementing the common + * interface IDataset */ - public E into(E into); + public E into(E into); } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IDatasetUserAccess.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IDatasetUserAccess.java index 7b84c962bfc..a5ef0e0ab73 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IDatasetUserAccess.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IDatasetUserAccess.java @@ -4,12 +4,10 @@ package edu.uci.ics.texera.dao.jooq.generated.tables.interfaces; -import edu.uci.ics.texera.dao.jooq.generated.enums.DatasetUserAccessPrivilege; +import edu.uci.ics.texera.dao.jooq.generated.enums.PrivilegeEnum; import java.io.Serializable; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -20,44 +18,46 @@ public interface IDatasetUserAccess extends Serializable { /** * Setter for texera_db.dataset_user_access.did. */ - public void setDid(UInteger value); + public void setDid(Integer value); /** * Getter for texera_db.dataset_user_access.did. */ - public UInteger getDid(); + public Integer getDid(); /** * Setter for texera_db.dataset_user_access.uid. */ - public void setUid(UInteger value); + public void setUid(Integer value); /** * Getter for texera_db.dataset_user_access.uid. */ - public UInteger getUid(); + public Integer getUid(); /** * Setter for texera_db.dataset_user_access.privilege. */ - public void setPrivilege(DatasetUserAccessPrivilege value); + public void setPrivilege(PrivilegeEnum value); /** * Getter for texera_db.dataset_user_access.privilege. */ - public DatasetUserAccessPrivilege getPrivilege(); + public PrivilegeEnum getPrivilege(); // ------------------------------------------------------------------------- // FROM and INTO // ------------------------------------------------------------------------- /** - * Load data from another generated Record/POJO implementing the common interface IDatasetUserAccess + * Load data from another generated Record/POJO implementing the common + * interface IDatasetUserAccess */ - public void from(edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IDatasetUserAccess from); + public void from(IDatasetUserAccess from); /** - * Copy data into another generated Record/POJO implementing the common interface IDatasetUserAccess + * Copy data into another generated Record/POJO implementing the common + * interface IDatasetUserAccess */ - public E into(E into); + public E into(E into); } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IDatasetUserLikes.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IDatasetUserLikes.java index b9bf758280e..8be8e4bd2d0 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IDatasetUserLikes.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IDatasetUserLikes.java @@ -6,8 +6,6 @@ import java.io.Serializable; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -18,34 +16,36 @@ public interface IDatasetUserLikes extends Serializable { /** * Setter for texera_db.dataset_user_likes.uid. */ - public void setUid(UInteger value); + public void setUid(Integer value); /** * Getter for texera_db.dataset_user_likes.uid. */ - public UInteger getUid(); + public Integer getUid(); /** * Setter for texera_db.dataset_user_likes.did. */ - public void setDid(UInteger value); + public void setDid(Integer value); /** * Getter for texera_db.dataset_user_likes.did. */ - public UInteger getDid(); + public Integer getDid(); // ------------------------------------------------------------------------- // FROM and INTO // ------------------------------------------------------------------------- /** - * Load data from another generated Record/POJO implementing the common interface IDatasetUserLikes + * Load data from another generated Record/POJO implementing the common + * interface IDatasetUserLikes */ - public void from(edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IDatasetUserLikes from); + public void from(IDatasetUserLikes from); /** - * Copy data into another generated Record/POJO implementing the common interface IDatasetUserLikes + * Copy data into another generated Record/POJO implementing the common + * interface IDatasetUserLikes */ - public E into(E into); + public E into(E into); } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IDatasetVersion.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IDatasetVersion.java index 1677f22a706..59e0c26e3dd 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IDatasetVersion.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IDatasetVersion.java @@ -7,8 +7,6 @@ import java.io.Serializable; import java.sql.Timestamp; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -19,32 +17,32 @@ public interface IDatasetVersion extends Serializable { /** * Setter for texera_db.dataset_version.dvid. */ - public void setDvid(UInteger value); + public void setDvid(Integer value); /** * Getter for texera_db.dataset_version.dvid. */ - public UInteger getDvid(); + public Integer getDvid(); /** * Setter for texera_db.dataset_version.did. */ - public void setDid(UInteger value); + public void setDid(Integer value); /** * Getter for texera_db.dataset_version.did. */ - public UInteger getDid(); + public Integer getDid(); /** * Setter for texera_db.dataset_version.creator_uid. */ - public void setCreatorUid(UInteger value); + public void setCreatorUid(Integer value); /** * Getter for texera_db.dataset_version.creator_uid. */ - public UInteger getCreatorUid(); + public Integer getCreatorUid(); /** * Setter for texera_db.dataset_version.name. @@ -81,12 +79,14 @@ public interface IDatasetVersion extends Serializable { // ------------------------------------------------------------------------- /** - * Load data from another generated Record/POJO implementing the common interface IDatasetVersion + * Load data from another generated Record/POJO implementing the common + * interface IDatasetVersion */ - public void from(edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IDatasetVersion from); + public void from(IDatasetVersion from); /** - * Copy data into another generated Record/POJO implementing the common interface IDatasetVersion + * Copy data into another generated Record/POJO implementing the common + * interface IDatasetVersion */ - public E into(E into); + public E into(E into); } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IDatasetViewCount.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IDatasetViewCount.java index 0894f9c76f2..f87e472f4e5 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IDatasetViewCount.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IDatasetViewCount.java @@ -6,8 +6,6 @@ import java.io.Serializable; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -18,34 +16,36 @@ public interface IDatasetViewCount extends Serializable { /** * Setter for texera_db.dataset_view_count.did. */ - public void setDid(UInteger value); + public void setDid(Integer value); /** * Getter for texera_db.dataset_view_count.did. */ - public UInteger getDid(); + public Integer getDid(); /** * Setter for texera_db.dataset_view_count.view_count. */ - public void setViewCount(UInteger value); + public void setViewCount(Integer value); /** * Getter for texera_db.dataset_view_count.view_count. */ - public UInteger getViewCount(); + public Integer getViewCount(); // ------------------------------------------------------------------------- // FROM and INTO // ------------------------------------------------------------------------- /** - * Load data from another generated Record/POJO implementing the common interface IDatasetViewCount + * Load data from another generated Record/POJO implementing the common + * interface IDatasetViewCount */ - public void from(edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IDatasetViewCount from); + public void from(IDatasetViewCount from); /** - * Copy data into another generated Record/POJO implementing the common interface IDatasetViewCount + * Copy data into another generated Record/POJO implementing the common + * interface IDatasetViewCount */ - public E into(E into); + public E into(E into); } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IOperatorExecutions.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IOperatorExecutions.java index cf2db966eae..f84ea8b6510 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IOperatorExecutions.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IOperatorExecutions.java @@ -6,8 +6,6 @@ import java.io.Serializable; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -16,14 +14,16 @@ public interface IOperatorExecutions extends Serializable { /** - * Setter for texera_db.operator_executions.workflow_execution_id. + * Setter for + * texera_db.operator_executions.workflow_execution_id. */ - public void setWorkflowExecutionId(UInteger value); + public void setWorkflowExecutionId(Integer value); /** - * Getter for texera_db.operator_executions.workflow_execution_id. + * Getter for + * texera_db.operator_executions.workflow_execution_id. */ - public UInteger getWorkflowExecutionId(); + public Integer getWorkflowExecutionId(); /** * Setter for texera_db.operator_executions.operator_id. @@ -36,12 +36,14 @@ public interface IOperatorExecutions extends Serializable { public String getOperatorId(); /** - * Setter for texera_db.operator_executions.console_messages_uri. + * Setter for + * texera_db.operator_executions.console_messages_uri. */ public void setConsoleMessagesUri(String value); /** - * Getter for texera_db.operator_executions.console_messages_uri. + * Getter for + * texera_db.operator_executions.console_messages_uri. */ public String getConsoleMessagesUri(); @@ -50,12 +52,14 @@ public interface IOperatorExecutions extends Serializable { // ------------------------------------------------------------------------- /** - * Load data from another generated Record/POJO implementing the common interface IOperatorExecutions + * Load data from another generated Record/POJO implementing the common + * interface IOperatorExecutions */ - public void from(edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IOperatorExecutions from); + public void from(IOperatorExecutions from); /** - * Copy data into another generated Record/POJO implementing the common interface IOperatorExecutions + * Copy data into another generated Record/POJO implementing the common + * interface IOperatorExecutions */ - public E into(E into); + public E into(E into); } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IOperatorPortExecutions.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IOperatorPortExecutions.java index 27d65505851..07fb0f4b212 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IOperatorPortExecutions.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IOperatorPortExecutions.java @@ -6,8 +6,6 @@ import java.io.Serializable; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -16,14 +14,16 @@ public interface IOperatorPortExecutions extends Serializable { /** - * Setter for texera_db.operator_port_executions.workflow_execution_id. + * Setter for + * texera_db.operator_port_executions.workflow_execution_id. */ - public void setWorkflowExecutionId(UInteger value); + public void setWorkflowExecutionId(Integer value); /** - * Getter for texera_db.operator_port_executions.workflow_execution_id. + * Getter for + * texera_db.operator_port_executions.workflow_execution_id. */ - public UInteger getWorkflowExecutionId(); + public Integer getWorkflowExecutionId(); /** * Setter for texera_db.operator_port_executions.operator_id. @@ -60,12 +60,14 @@ public interface IOperatorPortExecutions extends Serializable { // ------------------------------------------------------------------------- /** - * Load data from another generated Record/POJO implementing the common interface IOperatorPortExecutions + * Load data from another generated Record/POJO implementing the common + * interface IOperatorPortExecutions */ - public void from(edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IOperatorPortExecutions from); + public void from(IOperatorPortExecutions from); /** - * Copy data into another generated Record/POJO implementing the common interface IOperatorPortExecutions + * Copy data into another generated Record/POJO implementing the common + * interface IOperatorPortExecutions */ - public E into(E into); + public E into(E into); } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IProject.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IProject.java index 7344ad7cba0..b5b3d91f1e9 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IProject.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IProject.java @@ -7,8 +7,6 @@ import java.io.Serializable; import java.sql.Timestamp; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -19,12 +17,12 @@ public interface IProject extends Serializable { /** * Setter for texera_db.project.pid. */ - public void setPid(UInteger value); + public void setPid(Integer value); /** * Getter for texera_db.project.pid. */ - public UInteger getPid(); + public Integer getPid(); /** * Setter for texera_db.project.name. @@ -49,12 +47,12 @@ public interface IProject extends Serializable { /** * Setter for texera_db.project.owner_id. */ - public void setOwnerId(UInteger value); + public void setOwnerId(Integer value); /** * Getter for texera_db.project.owner_id. */ - public UInteger getOwnerId(); + public Integer getOwnerId(); /** * Setter for texera_db.project.creation_time. @@ -81,12 +79,14 @@ public interface IProject extends Serializable { // ------------------------------------------------------------------------- /** - * Load data from another generated Record/POJO implementing the common interface IProject + * Load data from another generated Record/POJO implementing the common + * interface IProject */ - public void from(edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IProject from); + public void from(IProject from); /** - * Copy data into another generated Record/POJO implementing the common interface IProject + * Copy data into another generated Record/POJO implementing the common + * interface IProject */ - public E into(E into); + public E into(E into); } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IProjectUserAccess.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IProjectUserAccess.java index 4be5f18f2d8..36298fd0f8c 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IProjectUserAccess.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IProjectUserAccess.java @@ -4,12 +4,10 @@ package edu.uci.ics.texera.dao.jooq.generated.tables.interfaces; -import edu.uci.ics.texera.dao.jooq.generated.enums.ProjectUserAccessPrivilege; +import edu.uci.ics.texera.dao.jooq.generated.enums.PrivilegeEnum; import java.io.Serializable; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -20,44 +18,46 @@ public interface IProjectUserAccess extends Serializable { /** * Setter for texera_db.project_user_access.uid. */ - public void setUid(UInteger value); + public void setUid(Integer value); /** * Getter for texera_db.project_user_access.uid. */ - public UInteger getUid(); + public Integer getUid(); /** * Setter for texera_db.project_user_access.pid. */ - public void setPid(UInteger value); + public void setPid(Integer value); /** * Getter for texera_db.project_user_access.pid. */ - public UInteger getPid(); + public Integer getPid(); /** * Setter for texera_db.project_user_access.privilege. */ - public void setPrivilege(ProjectUserAccessPrivilege value); + public void setPrivilege(PrivilegeEnum value); /** * Getter for texera_db.project_user_access.privilege. */ - public ProjectUserAccessPrivilege getPrivilege(); + public PrivilegeEnum getPrivilege(); // ------------------------------------------------------------------------- // FROM and INTO // ------------------------------------------------------------------------- /** - * Load data from another generated Record/POJO implementing the common interface IProjectUserAccess + * Load data from another generated Record/POJO implementing the common + * interface IProjectUserAccess */ - public void from(edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IProjectUserAccess from); + public void from(IProjectUserAccess from); /** - * Copy data into another generated Record/POJO implementing the common interface IProjectUserAccess + * Copy data into another generated Record/POJO implementing the common + * interface IProjectUserAccess */ - public E into(E into); + public E into(E into); } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IPublicProject.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IPublicProject.java index 7193c30d86c..89b6ee9067c 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IPublicProject.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IPublicProject.java @@ -6,8 +6,6 @@ import java.io.Serializable; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -18,34 +16,36 @@ public interface IPublicProject extends Serializable { /** * Setter for texera_db.public_project.pid. */ - public void setPid(UInteger value); + public void setPid(Integer value); /** * Getter for texera_db.public_project.pid. */ - public UInteger getPid(); + public Integer getPid(); /** * Setter for texera_db.public_project.uid. */ - public void setUid(UInteger value); + public void setUid(Integer value); /** * Getter for texera_db.public_project.uid. */ - public UInteger getUid(); + public Integer getUid(); // ------------------------------------------------------------------------- // FROM and INTO // ------------------------------------------------------------------------- /** - * Load data from another generated Record/POJO implementing the common interface IPublicProject + * Load data from another generated Record/POJO implementing the common + * interface IPublicProject */ - public void from(edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IPublicProject from); + public void from(IPublicProject from); /** - * Copy data into another generated Record/POJO implementing the common interface IPublicProject + * Copy data into another generated Record/POJO implementing the common + * interface IPublicProject */ - public E into(E into); + public E into(E into); } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IUser.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IUser.java index bc40987f5c7..a744dc215f0 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IUser.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IUser.java @@ -4,12 +4,10 @@ package edu.uci.ics.texera.dao.jooq.generated.tables.interfaces; -import edu.uci.ics.texera.dao.jooq.generated.enums.UserRole; +import edu.uci.ics.texera.dao.jooq.generated.enums.UserRoleEnum; import java.io.Serializable; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -20,12 +18,12 @@ public interface IUser extends Serializable { /** * Setter for texera_db.user.uid. */ - public void setUid(UInteger value); + public void setUid(Integer value); /** * Getter for texera_db.user.uid. */ - public UInteger getUid(); + public Integer getUid(); /** * Setter for texera_db.user.name. @@ -68,36 +66,38 @@ public interface IUser extends Serializable { public String getGoogleId(); /** - * Setter for texera_db.user.role. + * Setter for texera_db.user.google_avatar. */ - public void setRole(UserRole value); + public void setGoogleAvatar(String value); /** - * Getter for texera_db.user.role. + * Getter for texera_db.user.google_avatar. */ - public UserRole getRole(); + public String getGoogleAvatar(); /** - * Setter for texera_db.user.google_avatar. + * Setter for texera_db.user.role. */ - public void setGoogleAvatar(String value); + public void setRole(UserRoleEnum value); /** - * Getter for texera_db.user.google_avatar. + * Getter for texera_db.user.role. */ - public String getGoogleAvatar(); + public UserRoleEnum getRole(); // ------------------------------------------------------------------------- // FROM and INTO // ------------------------------------------------------------------------- /** - * Load data from another generated Record/POJO implementing the common interface IUser + * Load data from another generated Record/POJO implementing the common + * interface IUser */ - public void from(edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IUser from); + public void from(IUser from); /** - * Copy data into another generated Record/POJO implementing the common interface IUser + * Copy data into another generated Record/POJO implementing the common + * interface IUser */ - public E into(E into); + public E into(E into); } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IUserActivity.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IUserActivity.java index 97f2b1e757f..cb75c4aef99 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IUserActivity.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IUserActivity.java @@ -7,8 +7,6 @@ import java.io.Serializable; import java.sql.Timestamp; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -19,22 +17,22 @@ public interface IUserActivity extends Serializable { /** * Setter for texera_db.user_activity.uid. */ - public void setUid(UInteger value); + public void setUid(Integer value); /** * Getter for texera_db.user_activity.uid. */ - public UInteger getUid(); + public Integer getUid(); /** * Setter for texera_db.user_activity.id. */ - public void setId(UInteger value); + public void setId(Integer value); /** * Getter for texera_db.user_activity.id. */ - public UInteger getId(); + public Integer getId(); /** * Setter for texera_db.user_activity.type. @@ -81,12 +79,14 @@ public interface IUserActivity extends Serializable { // ------------------------------------------------------------------------- /** - * Load data from another generated Record/POJO implementing the common interface IUserActivity + * Load data from another generated Record/POJO implementing the common + * interface IUserActivity */ - public void from(edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IUserActivity from); + public void from(IUserActivity from); /** - * Copy data into another generated Record/POJO implementing the common interface IUserActivity + * Copy data into another generated Record/POJO implementing the common + * interface IUserActivity */ - public E into(E into); + public E into(E into); } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IUserConfig.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IUserConfig.java index 32d1c46d3ba..a67b21bf6ec 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IUserConfig.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IUserConfig.java @@ -6,8 +6,6 @@ import java.io.Serializable; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -18,12 +16,12 @@ public interface IUserConfig extends Serializable { /** * Setter for texera_db.user_config.uid. */ - public void setUid(UInteger value); + public void setUid(Integer value); /** * Getter for texera_db.user_config.uid. */ - public UInteger getUid(); + public Integer getUid(); /** * Setter for texera_db.user_config.key. @@ -50,12 +48,14 @@ public interface IUserConfig extends Serializable { // ------------------------------------------------------------------------- /** - * Load data from another generated Record/POJO implementing the common interface IUserConfig + * Load data from another generated Record/POJO implementing the common + * interface IUserConfig */ - public void from(edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IUserConfig from); + public void from(IUserConfig from); /** - * Copy data into another generated Record/POJO implementing the common interface IUserConfig + * Copy data into another generated Record/POJO implementing the common + * interface IUserConfig */ - public E into(E into); + public E into(E into); } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflow.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflow.java index 36206e6a0d2..b94e3bbac65 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflow.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflow.java @@ -7,8 +7,6 @@ import java.io.Serializable; import java.sql.Timestamp; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -16,6 +14,16 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public interface IWorkflow extends Serializable { + /** + * Setter for texera_db.workflow.wid. + */ + public void setWid(Integer value); + + /** + * Getter for texera_db.workflow.wid. + */ + public Integer getWid(); + /** * Setter for texera_db.workflow.name. */ @@ -36,16 +44,6 @@ public interface IWorkflow extends Serializable { */ public String getDescription(); - /** - * Setter for texera_db.workflow.wid. - */ - public void setWid(UInteger value); - - /** - * Getter for texera_db.workflow.wid. - */ - public UInteger getWid(); - /** * Setter for texera_db.workflow.content. */ @@ -79,24 +77,26 @@ public interface IWorkflow extends Serializable { /** * Setter for texera_db.workflow.is_public. */ - public void setIsPublic(Byte value); + public void setIsPublic(Boolean value); /** * Getter for texera_db.workflow.is_public. */ - public Byte getIsPublic(); + public Boolean getIsPublic(); // ------------------------------------------------------------------------- // FROM and INTO // ------------------------------------------------------------------------- /** - * Load data from another generated Record/POJO implementing the common interface IWorkflow + * Load data from another generated Record/POJO implementing the common + * interface IWorkflow */ - public void from(edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IWorkflow from); + public void from(IWorkflow from); /** - * Copy data into another generated Record/POJO implementing the common interface IWorkflow + * Copy data into another generated Record/POJO implementing the common + * interface IWorkflow */ - public E into(E into); + public E into(E into); } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflowExecutions.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflowExecutions.java index 2cecf85aaf8..556d2688495 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflowExecutions.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflowExecutions.java @@ -7,8 +7,6 @@ import java.io.Serializable; import java.sql.Timestamp; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -19,42 +17,42 @@ public interface IWorkflowExecutions extends Serializable { /** * Setter for texera_db.workflow_executions.eid. */ - public void setEid(UInteger value); + public void setEid(Integer value); /** * Getter for texera_db.workflow_executions.eid. */ - public UInteger getEid(); + public Integer getEid(); /** * Setter for texera_db.workflow_executions.vid. */ - public void setVid(UInteger value); + public void setVid(Integer value); /** * Getter for texera_db.workflow_executions.vid. */ - public UInteger getVid(); + public Integer getVid(); /** * Setter for texera_db.workflow_executions.uid. */ - public void setUid(UInteger value); + public void setUid(Integer value); /** * Getter for texera_db.workflow_executions.uid. */ - public UInteger getUid(); + public Integer getUid(); /** * Setter for texera_db.workflow_executions.status. */ - public void setStatus(Byte value); + public void setStatus(Short value); /** * Getter for texera_db.workflow_executions.status. */ - public Byte getStatus(); + public Short getStatus(); /** * Setter for texera_db.workflow_executions.result. @@ -89,12 +87,12 @@ public interface IWorkflowExecutions extends Serializable { /** * Setter for texera_db.workflow_executions.bookmarked. */ - public void setBookmarked(Byte value); + public void setBookmarked(Boolean value); /** * Getter for texera_db.workflow_executions.bookmarked. */ - public Byte getBookmarked(); + public Boolean getBookmarked(); /** * Setter for texera_db.workflow_executions.name. @@ -107,12 +105,14 @@ public interface IWorkflowExecutions extends Serializable { public String getName(); /** - * Setter for texera_db.workflow_executions.environment_version. + * Setter for + * texera_db.workflow_executions.environment_version. */ public void setEnvironmentVersion(String value); /** - * Getter for texera_db.workflow_executions.environment_version. + * Getter for + * texera_db.workflow_executions.environment_version. */ public String getEnvironmentVersion(); @@ -141,12 +141,14 @@ public interface IWorkflowExecutions extends Serializable { // ------------------------------------------------------------------------- /** - * Load data from another generated Record/POJO implementing the common interface IWorkflowExecutions + * Load data from another generated Record/POJO implementing the common + * interface IWorkflowExecutions */ - public void from(edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IWorkflowExecutions from); + public void from(IWorkflowExecutions from); /** - * Copy data into another generated Record/POJO implementing the common interface IWorkflowExecutions + * Copy data into another generated Record/POJO implementing the common + * interface IWorkflowExecutions */ - public E into(E into); + public E into(E into); } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflowOfProject.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflowOfProject.java index 4af32bf4ad0..ad5da5fb9f4 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflowOfProject.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflowOfProject.java @@ -6,8 +6,6 @@ import java.io.Serializable; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -18,34 +16,36 @@ public interface IWorkflowOfProject extends Serializable { /** * Setter for texera_db.workflow_of_project.wid. */ - public void setWid(UInteger value); + public void setWid(Integer value); /** * Getter for texera_db.workflow_of_project.wid. */ - public UInteger getWid(); + public Integer getWid(); /** * Setter for texera_db.workflow_of_project.pid. */ - public void setPid(UInteger value); + public void setPid(Integer value); /** * Getter for texera_db.workflow_of_project.pid. */ - public UInteger getPid(); + public Integer getPid(); // ------------------------------------------------------------------------- // FROM and INTO // ------------------------------------------------------------------------- /** - * Load data from another generated Record/POJO implementing the common interface IWorkflowOfProject + * Load data from another generated Record/POJO implementing the common + * interface IWorkflowOfProject */ - public void from(edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IWorkflowOfProject from); + public void from(IWorkflowOfProject from); /** - * Copy data into another generated Record/POJO implementing the common interface IWorkflowOfProject + * Copy data into another generated Record/POJO implementing the common + * interface IWorkflowOfProject */ - public E into(E into); + public E into(E into); } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflowOfUser.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflowOfUser.java index 12302a54f40..5dda64b071c 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflowOfUser.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflowOfUser.java @@ -6,8 +6,6 @@ import java.io.Serializable; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -18,34 +16,36 @@ public interface IWorkflowOfUser extends Serializable { /** * Setter for texera_db.workflow_of_user.uid. */ - public void setUid(UInteger value); + public void setUid(Integer value); /** * Getter for texera_db.workflow_of_user.uid. */ - public UInteger getUid(); + public Integer getUid(); /** * Setter for texera_db.workflow_of_user.wid. */ - public void setWid(UInteger value); + public void setWid(Integer value); /** * Getter for texera_db.workflow_of_user.wid. */ - public UInteger getWid(); + public Integer getWid(); // ------------------------------------------------------------------------- // FROM and INTO // ------------------------------------------------------------------------- /** - * Load data from another generated Record/POJO implementing the common interface IWorkflowOfUser + * Load data from another generated Record/POJO implementing the common + * interface IWorkflowOfUser */ - public void from(edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IWorkflowOfUser from); + public void from(IWorkflowOfUser from); /** - * Copy data into another generated Record/POJO implementing the common interface IWorkflowOfUser + * Copy data into another generated Record/POJO implementing the common + * interface IWorkflowOfUser */ - public E into(E into); + public E into(E into); } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflowUserAccess.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflowUserAccess.java index 266d55a8e0c..fe0612ca5ac 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflowUserAccess.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflowUserAccess.java @@ -4,12 +4,10 @@ package edu.uci.ics.texera.dao.jooq.generated.tables.interfaces; -import edu.uci.ics.texera.dao.jooq.generated.enums.WorkflowUserAccessPrivilege; +import edu.uci.ics.texera.dao.jooq.generated.enums.PrivilegeEnum; import java.io.Serializable; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -20,44 +18,46 @@ public interface IWorkflowUserAccess extends Serializable { /** * Setter for texera_db.workflow_user_access.uid. */ - public void setUid(UInteger value); + public void setUid(Integer value); /** * Getter for texera_db.workflow_user_access.uid. */ - public UInteger getUid(); + public Integer getUid(); /** * Setter for texera_db.workflow_user_access.wid. */ - public void setWid(UInteger value); + public void setWid(Integer value); /** * Getter for texera_db.workflow_user_access.wid. */ - public UInteger getWid(); + public Integer getWid(); /** * Setter for texera_db.workflow_user_access.privilege. */ - public void setPrivilege(WorkflowUserAccessPrivilege value); + public void setPrivilege(PrivilegeEnum value); /** * Getter for texera_db.workflow_user_access.privilege. */ - public WorkflowUserAccessPrivilege getPrivilege(); + public PrivilegeEnum getPrivilege(); // ------------------------------------------------------------------------- // FROM and INTO // ------------------------------------------------------------------------- /** - * Load data from another generated Record/POJO implementing the common interface IWorkflowUserAccess + * Load data from another generated Record/POJO implementing the common + * interface IWorkflowUserAccess */ - public void from(edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IWorkflowUserAccess from); + public void from(IWorkflowUserAccess from); /** - * Copy data into another generated Record/POJO implementing the common interface IWorkflowUserAccess + * Copy data into another generated Record/POJO implementing the common + * interface IWorkflowUserAccess */ - public E into(E into); + public E into(E into); } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflowUserClones.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflowUserClones.java index 28340c850b4..e0a2fb74a75 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflowUserClones.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflowUserClones.java @@ -6,8 +6,6 @@ import java.io.Serializable; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -18,34 +16,36 @@ public interface IWorkflowUserClones extends Serializable { /** * Setter for texera_db.workflow_user_clones.uid. */ - public void setUid(UInteger value); + public void setUid(Integer value); /** * Getter for texera_db.workflow_user_clones.uid. */ - public UInteger getUid(); + public Integer getUid(); /** * Setter for texera_db.workflow_user_clones.wid. */ - public void setWid(UInteger value); + public void setWid(Integer value); /** * Getter for texera_db.workflow_user_clones.wid. */ - public UInteger getWid(); + public Integer getWid(); // ------------------------------------------------------------------------- // FROM and INTO // ------------------------------------------------------------------------- /** - * Load data from another generated Record/POJO implementing the common interface IWorkflowUserClones + * Load data from another generated Record/POJO implementing the common + * interface IWorkflowUserClones */ - public void from(edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IWorkflowUserClones from); + public void from(IWorkflowUserClones from); /** - * Copy data into another generated Record/POJO implementing the common interface IWorkflowUserClones + * Copy data into another generated Record/POJO implementing the common + * interface IWorkflowUserClones */ - public E into(E into); + public E into(E into); } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflowUserLikes.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflowUserLikes.java index d796b913e1b..e4967553105 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflowUserLikes.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflowUserLikes.java @@ -6,8 +6,6 @@ import java.io.Serializable; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -18,34 +16,36 @@ public interface IWorkflowUserLikes extends Serializable { /** * Setter for texera_db.workflow_user_likes.uid. */ - public void setUid(UInteger value); + public void setUid(Integer value); /** * Getter for texera_db.workflow_user_likes.uid. */ - public UInteger getUid(); + public Integer getUid(); /** * Setter for texera_db.workflow_user_likes.wid. */ - public void setWid(UInteger value); + public void setWid(Integer value); /** * Getter for texera_db.workflow_user_likes.wid. */ - public UInteger getWid(); + public Integer getWid(); // ------------------------------------------------------------------------- // FROM and INTO // ------------------------------------------------------------------------- /** - * Load data from another generated Record/POJO implementing the common interface IWorkflowUserLikes + * Load data from another generated Record/POJO implementing the common + * interface IWorkflowUserLikes */ - public void from(edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IWorkflowUserLikes from); + public void from(IWorkflowUserLikes from); /** - * Copy data into another generated Record/POJO implementing the common interface IWorkflowUserLikes + * Copy data into another generated Record/POJO implementing the common + * interface IWorkflowUserLikes */ - public E into(E into); + public E into(E into); } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflowVersion.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflowVersion.java index d44cf652568..50eeb57af2d 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflowVersion.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflowVersion.java @@ -7,8 +7,6 @@ import java.io.Serializable; import java.sql.Timestamp; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -19,22 +17,22 @@ public interface IWorkflowVersion extends Serializable { /** * Setter for texera_db.workflow_version.vid. */ - public void setVid(UInteger value); + public void setVid(Integer value); /** * Getter for texera_db.workflow_version.vid. */ - public UInteger getVid(); + public Integer getVid(); /** * Setter for texera_db.workflow_version.wid. */ - public void setWid(UInteger value); + public void setWid(Integer value); /** * Getter for texera_db.workflow_version.wid. */ - public UInteger getWid(); + public Integer getWid(); /** * Setter for texera_db.workflow_version.content. @@ -61,12 +59,14 @@ public interface IWorkflowVersion extends Serializable { // ------------------------------------------------------------------------- /** - * Load data from another generated Record/POJO implementing the common interface IWorkflowVersion + * Load data from another generated Record/POJO implementing the common + * interface IWorkflowVersion */ - public void from(edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IWorkflowVersion from); + public void from(IWorkflowVersion from); /** - * Copy data into another generated Record/POJO implementing the common interface IWorkflowVersion + * Copy data into another generated Record/POJO implementing the common + * interface IWorkflowVersion */ - public E into(E into); + public E into(E into); } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflowViewCount.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflowViewCount.java index 6471013ec41..585db60d7d4 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflowViewCount.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/interfaces/IWorkflowViewCount.java @@ -6,8 +6,6 @@ import java.io.Serializable; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -18,34 +16,36 @@ public interface IWorkflowViewCount extends Serializable { /** * Setter for texera_db.workflow_view_count.wid. */ - public void setWid(UInteger value); + public void setWid(Integer value); /** * Getter for texera_db.workflow_view_count.wid. */ - public UInteger getWid(); + public Integer getWid(); /** * Setter for texera_db.workflow_view_count.view_count. */ - public void setViewCount(UInteger value); + public void setViewCount(Integer value); /** * Getter for texera_db.workflow_view_count.view_count. */ - public UInteger getViewCount(); + public Integer getViewCount(); // ------------------------------------------------------------------------- // FROM and INTO // ------------------------------------------------------------------------- /** - * Load data from another generated Record/POJO implementing the common interface IWorkflowViewCount + * Load data from another generated Record/POJO implementing the common + * interface IWorkflowViewCount */ - public void from(edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IWorkflowViewCount from); + public void from(IWorkflowViewCount from); /** - * Copy data into another generated Record/POJO implementing the common interface IWorkflowViewCount + * Copy data into another generated Record/POJO implementing the common + * interface IWorkflowViewCount */ - public E into(E into); + public E into(E into); } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/Dataset.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/Dataset.java index 71854c0adab..6951c20b1aa 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/Dataset.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/Dataset.java @@ -8,8 +8,6 @@ import java.sql.Timestamp; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -17,12 +15,12 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class Dataset implements IDataset { - private static final long serialVersionUID = -1220666229; + private static final long serialVersionUID = 1L; - private UInteger did; - private UInteger ownerUid; + private Integer did; + private Integer ownerUid; private String name; - private Byte isPublic; + private Boolean isPublic; private String description; private Timestamp creationTime; @@ -38,10 +36,10 @@ public Dataset(IDataset value) { } public Dataset( - UInteger did, - UInteger ownerUid, + Integer did, + Integer ownerUid, String name, - Byte isPublic, + Boolean isPublic, String description, Timestamp creationTime ) { @@ -53,61 +51,97 @@ public Dataset( this.creationTime = creationTime; } + /** + * Getter for texera_db.dataset.did. + */ @Override - public UInteger getDid() { + public Integer getDid() { return this.did; } + /** + * Setter for texera_db.dataset.did. + */ @Override - public void setDid(UInteger did) { + public void setDid(Integer did) { this.did = did; } + /** + * Getter for texera_db.dataset.owner_uid. + */ @Override - public UInteger getOwnerUid() { + public Integer getOwnerUid() { return this.ownerUid; } + /** + * Setter for texera_db.dataset.owner_uid. + */ @Override - public void setOwnerUid(UInteger ownerUid) { + public void setOwnerUid(Integer ownerUid) { this.ownerUid = ownerUid; } + /** + * Getter for texera_db.dataset.name. + */ @Override public String getName() { return this.name; } + /** + * Setter for texera_db.dataset.name. + */ @Override public void setName(String name) { this.name = name; } + /** + * Getter for texera_db.dataset.is_public. + */ @Override - public Byte getIsPublic() { + public Boolean getIsPublic() { return this.isPublic; } + /** + * Setter for texera_db.dataset.is_public. + */ @Override - public void setIsPublic(Byte isPublic) { + public void setIsPublic(Boolean isPublic) { this.isPublic = isPublic; } + /** + * Getter for texera_db.dataset.description. + */ @Override public String getDescription() { return this.description; } + /** + * Setter for texera_db.dataset.description. + */ @Override public void setDescription(String description) { this.description = description; } + /** + * Getter for texera_db.dataset.creation_time. + */ @Override public Timestamp getCreationTime() { return this.creationTime; } + /** + * Setter for texera_db.dataset.creation_time. + */ @Override public void setCreationTime(Timestamp creationTime) { this.creationTime = creationTime; diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/DatasetUserAccess.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/DatasetUserAccess.java index ec653d1e767..63b15f9d0be 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/DatasetUserAccess.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/DatasetUserAccess.java @@ -4,11 +4,9 @@ package edu.uci.ics.texera.dao.jooq.generated.tables.pojos; -import edu.uci.ics.texera.dao.jooq.generated.enums.DatasetUserAccessPrivilege; +import edu.uci.ics.texera.dao.jooq.generated.enums.PrivilegeEnum; import edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IDatasetUserAccess; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -16,11 +14,11 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class DatasetUserAccess implements IDatasetUserAccess { - private static final long serialVersionUID = -529435584; + private static final long serialVersionUID = 1L; - private UInteger did; - private UInteger uid; - private DatasetUserAccessPrivilege privilege; + private Integer did; + private Integer uid; + private PrivilegeEnum privilege; public DatasetUserAccess() {} @@ -31,42 +29,60 @@ public DatasetUserAccess(IDatasetUserAccess value) { } public DatasetUserAccess( - UInteger did, - UInteger uid, - DatasetUserAccessPrivilege privilege + Integer did, + Integer uid, + PrivilegeEnum privilege ) { this.did = did; this.uid = uid; this.privilege = privilege; } + /** + * Getter for texera_db.dataset_user_access.did. + */ @Override - public UInteger getDid() { + public Integer getDid() { return this.did; } + /** + * Setter for texera_db.dataset_user_access.did. + */ @Override - public void setDid(UInteger did) { + public void setDid(Integer did) { this.did = did; } + /** + * Getter for texera_db.dataset_user_access.uid. + */ @Override - public UInteger getUid() { + public Integer getUid() { return this.uid; } + /** + * Setter for texera_db.dataset_user_access.uid. + */ @Override - public void setUid(UInteger uid) { + public void setUid(Integer uid) { this.uid = uid; } + /** + * Getter for texera_db.dataset_user_access.privilege. + */ @Override - public DatasetUserAccessPrivilege getPrivilege() { + public PrivilegeEnum getPrivilege() { return this.privilege; } + /** + * Setter for texera_db.dataset_user_access.privilege. + */ @Override - public void setPrivilege(DatasetUserAccessPrivilege privilege) { + public void setPrivilege(PrivilegeEnum privilege) { this.privilege = privilege; } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/DatasetUserLikes.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/DatasetUserLikes.java index 7e2829cd8b2..3ab8cadde1c 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/DatasetUserLikes.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/DatasetUserLikes.java @@ -6,8 +6,6 @@ import edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IDatasetUserLikes; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -15,10 +13,10 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class DatasetUserLikes implements IDatasetUserLikes { - private static final long serialVersionUID = -230105384; + private static final long serialVersionUID = 1L; - private UInteger uid; - private UInteger did; + private Integer uid; + private Integer did; public DatasetUserLikes() {} @@ -28,30 +26,42 @@ public DatasetUserLikes(IDatasetUserLikes value) { } public DatasetUserLikes( - UInteger uid, - UInteger did + Integer uid, + Integer did ) { this.uid = uid; this.did = did; } + /** + * Getter for texera_db.dataset_user_likes.uid. + */ @Override - public UInteger getUid() { + public Integer getUid() { return this.uid; } + /** + * Setter for texera_db.dataset_user_likes.uid. + */ @Override - public void setUid(UInteger uid) { + public void setUid(Integer uid) { this.uid = uid; } + /** + * Getter for texera_db.dataset_user_likes.did. + */ @Override - public UInteger getDid() { + public Integer getDid() { return this.did; } + /** + * Setter for texera_db.dataset_user_likes.did. + */ @Override - public void setDid(UInteger did) { + public void setDid(Integer did) { this.did = did; } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/DatasetVersion.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/DatasetVersion.java index e2cb6751741..ad6f6f4a09f 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/DatasetVersion.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/DatasetVersion.java @@ -8,8 +8,6 @@ import java.sql.Timestamp; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -17,11 +15,11 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class DatasetVersion implements IDatasetVersion { - private static final long serialVersionUID = 1052637628; + private static final long serialVersionUID = 1L; - private UInteger dvid; - private UInteger did; - private UInteger creatorUid; + private Integer dvid; + private Integer did; + private Integer creatorUid; private String name; private String versionHash; private Timestamp creationTime; @@ -38,9 +36,9 @@ public DatasetVersion(IDatasetVersion value) { } public DatasetVersion( - UInteger dvid, - UInteger did, - UInteger creatorUid, + Integer dvid, + Integer did, + Integer creatorUid, String name, String versionHash, Timestamp creationTime @@ -53,61 +51,97 @@ public DatasetVersion( this.creationTime = creationTime; } + /** + * Getter for texera_db.dataset_version.dvid. + */ @Override - public UInteger getDvid() { + public Integer getDvid() { return this.dvid; } + /** + * Setter for texera_db.dataset_version.dvid. + */ @Override - public void setDvid(UInteger dvid) { + public void setDvid(Integer dvid) { this.dvid = dvid; } + /** + * Getter for texera_db.dataset_version.did. + */ @Override - public UInteger getDid() { + public Integer getDid() { return this.did; } + /** + * Setter for texera_db.dataset_version.did. + */ @Override - public void setDid(UInteger did) { + public void setDid(Integer did) { this.did = did; } + /** + * Getter for texera_db.dataset_version.creator_uid. + */ @Override - public UInteger getCreatorUid() { + public Integer getCreatorUid() { return this.creatorUid; } + /** + * Setter for texera_db.dataset_version.creator_uid. + */ @Override - public void setCreatorUid(UInteger creatorUid) { + public void setCreatorUid(Integer creatorUid) { this.creatorUid = creatorUid; } + /** + * Getter for texera_db.dataset_version.name. + */ @Override public String getName() { return this.name; } + /** + * Setter for texera_db.dataset_version.name. + */ @Override public void setName(String name) { this.name = name; } + /** + * Getter for texera_db.dataset_version.version_hash. + */ @Override public String getVersionHash() { return this.versionHash; } + /** + * Setter for texera_db.dataset_version.version_hash. + */ @Override public void setVersionHash(String versionHash) { this.versionHash = versionHash; } + /** + * Getter for texera_db.dataset_version.creation_time. + */ @Override public Timestamp getCreationTime() { return this.creationTime; } + /** + * Setter for texera_db.dataset_version.creation_time. + */ @Override public void setCreationTime(Timestamp creationTime) { this.creationTime = creationTime; diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/DatasetViewCount.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/DatasetViewCount.java index 37f2665a4eb..81314c5fb87 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/DatasetViewCount.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/DatasetViewCount.java @@ -6,8 +6,6 @@ import edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IDatasetViewCount; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -15,10 +13,10 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class DatasetViewCount implements IDatasetViewCount { - private static final long serialVersionUID = 584045490; + private static final long serialVersionUID = 1L; - private UInteger did; - private UInteger viewCount; + private Integer did; + private Integer viewCount; public DatasetViewCount() {} @@ -28,30 +26,42 @@ public DatasetViewCount(IDatasetViewCount value) { } public DatasetViewCount( - UInteger did, - UInteger viewCount + Integer did, + Integer viewCount ) { this.did = did; this.viewCount = viewCount; } + /** + * Getter for texera_db.dataset_view_count.did. + */ @Override - public UInteger getDid() { + public Integer getDid() { return this.did; } + /** + * Setter for texera_db.dataset_view_count.did. + */ @Override - public void setDid(UInteger did) { + public void setDid(Integer did) { this.did = did; } + /** + * Getter for texera_db.dataset_view_count.view_count. + */ @Override - public UInteger getViewCount() { + public Integer getViewCount() { return this.viewCount; } + /** + * Setter for texera_db.dataset_view_count.view_count. + */ @Override - public void setViewCount(UInteger viewCount) { + public void setViewCount(Integer viewCount) { this.viewCount = viewCount; } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/OperatorExecutions.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/OperatorExecutions.java index 22b55c58cac..bbe6bc194d0 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/OperatorExecutions.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/OperatorExecutions.java @@ -6,8 +6,6 @@ import edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IOperatorExecutions; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -15,11 +13,11 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class OperatorExecutions implements IOperatorExecutions { - private static final long serialVersionUID = -85872319; + private static final long serialVersionUID = 1L; - private UInteger workflowExecutionId; - private String operatorId; - private String consoleMessagesUri; + private Integer workflowExecutionId; + private String operatorId; + private String consoleMessagesUri; public OperatorExecutions() {} @@ -30,40 +28,62 @@ public OperatorExecutions(IOperatorExecutions value) { } public OperatorExecutions( - UInteger workflowExecutionId, - String operatorId, - String consoleMessagesUri + Integer workflowExecutionId, + String operatorId, + String consoleMessagesUri ) { this.workflowExecutionId = workflowExecutionId; this.operatorId = operatorId; this.consoleMessagesUri = consoleMessagesUri; } + /** + * Getter for + * texera_db.operator_executions.workflow_execution_id. + */ @Override - public UInteger getWorkflowExecutionId() { + public Integer getWorkflowExecutionId() { return this.workflowExecutionId; } + /** + * Setter for + * texera_db.operator_executions.workflow_execution_id. + */ @Override - public void setWorkflowExecutionId(UInteger workflowExecutionId) { + public void setWorkflowExecutionId(Integer workflowExecutionId) { this.workflowExecutionId = workflowExecutionId; } + /** + * Getter for texera_db.operator_executions.operator_id. + */ @Override public String getOperatorId() { return this.operatorId; } + /** + * Setter for texera_db.operator_executions.operator_id. + */ @Override public void setOperatorId(String operatorId) { this.operatorId = operatorId; } + /** + * Getter for + * texera_db.operator_executions.console_messages_uri. + */ @Override public String getConsoleMessagesUri() { return this.consoleMessagesUri; } + /** + * Setter for + * texera_db.operator_executions.console_messages_uri. + */ @Override public void setConsoleMessagesUri(String consoleMessagesUri) { this.consoleMessagesUri = consoleMessagesUri; diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/OperatorPortExecutions.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/OperatorPortExecutions.java index 8aef28b48a6..4c88d214847 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/OperatorPortExecutions.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/OperatorPortExecutions.java @@ -6,8 +6,6 @@ import edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IOperatorPortExecutions; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -15,12 +13,12 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class OperatorPortExecutions implements IOperatorPortExecutions { - private static final long serialVersionUID = -912694271; + private static final long serialVersionUID = 1L; - private UInteger workflowExecutionId; - private String operatorId; - private Integer portId; - private String resultUri; + private Integer workflowExecutionId; + private String operatorId; + private Integer portId; + private String resultUri; public OperatorPortExecutions() {} @@ -32,10 +30,10 @@ public OperatorPortExecutions(IOperatorPortExecutions value) { } public OperatorPortExecutions( - UInteger workflowExecutionId, - String operatorId, - Integer portId, - String resultUri + Integer workflowExecutionId, + String operatorId, + Integer portId, + String resultUri ) { this.workflowExecutionId = workflowExecutionId; this.operatorId = operatorId; @@ -43,41 +41,67 @@ public OperatorPortExecutions( this.resultUri = resultUri; } + /** + * Getter for + * texera_db.operator_port_executions.workflow_execution_id. + */ @Override - public UInteger getWorkflowExecutionId() { + public Integer getWorkflowExecutionId() { return this.workflowExecutionId; } + /** + * Setter for + * texera_db.operator_port_executions.workflow_execution_id. + */ @Override - public void setWorkflowExecutionId(UInteger workflowExecutionId) { + public void setWorkflowExecutionId(Integer workflowExecutionId) { this.workflowExecutionId = workflowExecutionId; } + /** + * Getter for texera_db.operator_port_executions.operator_id. + */ @Override public String getOperatorId() { return this.operatorId; } + /** + * Setter for texera_db.operator_port_executions.operator_id. + */ @Override public void setOperatorId(String operatorId) { this.operatorId = operatorId; } + /** + * Getter for texera_db.operator_port_executions.port_id. + */ @Override public Integer getPortId() { return this.portId; } + /** + * Setter for texera_db.operator_port_executions.port_id. + */ @Override public void setPortId(Integer portId) { this.portId = portId; } + /** + * Getter for texera_db.operator_port_executions.result_uri. + */ @Override public String getResultUri() { return this.resultUri; } + /** + * Setter for texera_db.operator_port_executions.result_uri. + */ @Override public void setResultUri(String resultUri) { this.resultUri = resultUri; diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/Project.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/Project.java index be550be95a6..7e72df6fd92 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/Project.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/Project.java @@ -8,8 +8,6 @@ import java.sql.Timestamp; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -17,12 +15,12 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class Project implements IProject { - private static final long serialVersionUID = 1518881636; + private static final long serialVersionUID = 1L; - private UInteger pid; + private Integer pid; private String name; private String description; - private UInteger ownerId; + private Integer ownerId; private Timestamp creationTime; private String color; @@ -38,10 +36,10 @@ public Project(IProject value) { } public Project( - UInteger pid, + Integer pid, String name, String description, - UInteger ownerId, + Integer ownerId, Timestamp creationTime, String color ) { @@ -53,61 +51,97 @@ public Project( this.color = color; } + /** + * Getter for texera_db.project.pid. + */ @Override - public UInteger getPid() { + public Integer getPid() { return this.pid; } + /** + * Setter for texera_db.project.pid. + */ @Override - public void setPid(UInteger pid) { + public void setPid(Integer pid) { this.pid = pid; } + /** + * Getter for texera_db.project.name. + */ @Override public String getName() { return this.name; } + /** + * Setter for texera_db.project.name. + */ @Override public void setName(String name) { this.name = name; } + /** + * Getter for texera_db.project.description. + */ @Override public String getDescription() { return this.description; } + /** + * Setter for texera_db.project.description. + */ @Override public void setDescription(String description) { this.description = description; } + /** + * Getter for texera_db.project.owner_id. + */ @Override - public UInteger getOwnerId() { + public Integer getOwnerId() { return this.ownerId; } + /** + * Setter for texera_db.project.owner_id. + */ @Override - public void setOwnerId(UInteger ownerId) { + public void setOwnerId(Integer ownerId) { this.ownerId = ownerId; } + /** + * Getter for texera_db.project.creation_time. + */ @Override public Timestamp getCreationTime() { return this.creationTime; } + /** + * Setter for texera_db.project.creation_time. + */ @Override public void setCreationTime(Timestamp creationTime) { this.creationTime = creationTime; } + /** + * Getter for texera_db.project.color. + */ @Override public String getColor() { return this.color; } + /** + * Setter for texera_db.project.color. + */ @Override public void setColor(String color) { this.color = color; diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/ProjectUserAccess.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/ProjectUserAccess.java index 203ea4dd8d7..251e2bf4c15 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/ProjectUserAccess.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/ProjectUserAccess.java @@ -4,11 +4,9 @@ package edu.uci.ics.texera.dao.jooq.generated.tables.pojos; -import edu.uci.ics.texera.dao.jooq.generated.enums.ProjectUserAccessPrivilege; +import edu.uci.ics.texera.dao.jooq.generated.enums.PrivilegeEnum; import edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IProjectUserAccess; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -16,11 +14,11 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class ProjectUserAccess implements IProjectUserAccess { - private static final long serialVersionUID = 1449179369; + private static final long serialVersionUID = 1L; - private UInteger uid; - private UInteger pid; - private ProjectUserAccessPrivilege privilege; + private Integer uid; + private Integer pid; + private PrivilegeEnum privilege; public ProjectUserAccess() {} @@ -31,42 +29,60 @@ public ProjectUserAccess(IProjectUserAccess value) { } public ProjectUserAccess( - UInteger uid, - UInteger pid, - ProjectUserAccessPrivilege privilege + Integer uid, + Integer pid, + PrivilegeEnum privilege ) { this.uid = uid; this.pid = pid; this.privilege = privilege; } + /** + * Getter for texera_db.project_user_access.uid. + */ @Override - public UInteger getUid() { + public Integer getUid() { return this.uid; } + /** + * Setter for texera_db.project_user_access.uid. + */ @Override - public void setUid(UInteger uid) { + public void setUid(Integer uid) { this.uid = uid; } + /** + * Getter for texera_db.project_user_access.pid. + */ @Override - public UInteger getPid() { + public Integer getPid() { return this.pid; } + /** + * Setter for texera_db.project_user_access.pid. + */ @Override - public void setPid(UInteger pid) { + public void setPid(Integer pid) { this.pid = pid; } + /** + * Getter for texera_db.project_user_access.privilege. + */ @Override - public ProjectUserAccessPrivilege getPrivilege() { + public PrivilegeEnum getPrivilege() { return this.privilege; } + /** + * Setter for texera_db.project_user_access.privilege. + */ @Override - public void setPrivilege(ProjectUserAccessPrivilege privilege) { + public void setPrivilege(PrivilegeEnum privilege) { this.privilege = privilege; } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/PublicProject.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/PublicProject.java index 8829cd4d533..e1d40a03c05 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/PublicProject.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/PublicProject.java @@ -6,8 +6,6 @@ import edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IPublicProject; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -15,10 +13,10 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class PublicProject implements IPublicProject { - private static final long serialVersionUID = -922400626; + private static final long serialVersionUID = 1L; - private UInteger pid; - private UInteger uid; + private Integer pid; + private Integer uid; public PublicProject() {} @@ -28,30 +26,42 @@ public PublicProject(IPublicProject value) { } public PublicProject( - UInteger pid, - UInteger uid + Integer pid, + Integer uid ) { this.pid = pid; this.uid = uid; } + /** + * Getter for texera_db.public_project.pid. + */ @Override - public UInteger getPid() { + public Integer getPid() { return this.pid; } + /** + * Setter for texera_db.public_project.pid. + */ @Override - public void setPid(UInteger pid) { + public void setPid(Integer pid) { this.pid = pid; } + /** + * Getter for texera_db.public_project.uid. + */ @Override - public UInteger getUid() { + public Integer getUid() { return this.uid; } + /** + * Setter for texera_db.public_project.uid. + */ @Override - public void setUid(UInteger uid) { + public void setUid(Integer uid) { this.uid = uid; } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/User.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/User.java index bf24d0cdbcb..c1cd342ddee 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/User.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/User.java @@ -4,11 +4,9 @@ package edu.uci.ics.texera.dao.jooq.generated.tables.pojos; -import edu.uci.ics.texera.dao.jooq.generated.enums.UserRole; +import edu.uci.ics.texera.dao.jooq.generated.enums.UserRoleEnum; import edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IUser; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -16,15 +14,15 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class User implements IUser { - private static final long serialVersionUID = -51594379; + private static final long serialVersionUID = 1L; - private UInteger uid; - private String name; - private String email; - private String password; - private String googleId; - private UserRole role; - private String googleAvatar; + private Integer uid; + private String name; + private String email; + private String password; + private String googleId; + private String googleAvatar; + private UserRoleEnum role; public User() {} @@ -34,96 +32,138 @@ public User(IUser value) { this.email = value.getEmail(); this.password = value.getPassword(); this.googleId = value.getGoogleId(); - this.role = value.getRole(); this.googleAvatar = value.getGoogleAvatar(); + this.role = value.getRole(); } public User( - UInteger uid, - String name, - String email, - String password, - String googleId, - UserRole role, - String googleAvatar + Integer uid, + String name, + String email, + String password, + String googleId, + String googleAvatar, + UserRoleEnum role ) { this.uid = uid; this.name = name; this.email = email; this.password = password; this.googleId = googleId; - this.role = role; this.googleAvatar = googleAvatar; + this.role = role; } + /** + * Getter for texera_db.user.uid. + */ @Override - public UInteger getUid() { + public Integer getUid() { return this.uid; } + /** + * Setter for texera_db.user.uid. + */ @Override - public void setUid(UInteger uid) { + public void setUid(Integer uid) { this.uid = uid; } + /** + * Getter for texera_db.user.name. + */ @Override public String getName() { return this.name; } + /** + * Setter for texera_db.user.name. + */ @Override public void setName(String name) { this.name = name; } + /** + * Getter for texera_db.user.email. + */ @Override public String getEmail() { return this.email; } + /** + * Setter for texera_db.user.email. + */ @Override public void setEmail(String email) { this.email = email; } + /** + * Getter for texera_db.user.password. + */ @Override public String getPassword() { return this.password; } + /** + * Setter for texera_db.user.password. + */ @Override public void setPassword(String password) { this.password = password; } + /** + * Getter for texera_db.user.google_id. + */ @Override public String getGoogleId() { return this.googleId; } + /** + * Setter for texera_db.user.google_id. + */ @Override public void setGoogleId(String googleId) { this.googleId = googleId; } + /** + * Getter for texera_db.user.google_avatar. + */ @Override - public UserRole getRole() { - return this.role; + public String getGoogleAvatar() { + return this.googleAvatar; } + /** + * Setter for texera_db.user.google_avatar. + */ @Override - public void setRole(UserRole role) { - this.role = role; + public void setGoogleAvatar(String googleAvatar) { + this.googleAvatar = googleAvatar; } + /** + * Getter for texera_db.user.role. + */ @Override - public String getGoogleAvatar() { - return this.googleAvatar; + public UserRoleEnum getRole() { + return this.role; } + /** + * Setter for texera_db.user.role. + */ @Override - public void setGoogleAvatar(String googleAvatar) { - this.googleAvatar = googleAvatar; + public void setRole(UserRoleEnum role) { + this.role = role; } @Override @@ -135,8 +175,8 @@ public String toString() { sb.append(", ").append(email); sb.append(", ").append(password); sb.append(", ").append(googleId); - sb.append(", ").append(role); sb.append(", ").append(googleAvatar); + sb.append(", ").append(role); sb.append(")"); return sb.toString(); @@ -153,8 +193,8 @@ public void from(IUser from) { setEmail(from.getEmail()); setPassword(from.getPassword()); setGoogleId(from.getGoogleId()); - setRole(from.getRole()); setGoogleAvatar(from.getGoogleAvatar()); + setRole(from.getRole()); } @Override diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/UserActivity.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/UserActivity.java index a8c1914216f..e1c4e431b06 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/UserActivity.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/UserActivity.java @@ -8,8 +8,6 @@ import java.sql.Timestamp; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -17,10 +15,10 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class UserActivity implements IUserActivity { - private static final long serialVersionUID = -312641480; + private static final long serialVersionUID = 1L; - private UInteger uid; - private UInteger id; + private Integer uid; + private Integer id; private String type; private String ip; private String activate; @@ -38,8 +36,8 @@ public UserActivity(IUserActivity value) { } public UserActivity( - UInteger uid, - UInteger id, + Integer uid, + Integer id, String type, String ip, String activate, @@ -53,61 +51,97 @@ public UserActivity( this.activityTime = activityTime; } + /** + * Getter for texera_db.user_activity.uid. + */ @Override - public UInteger getUid() { + public Integer getUid() { return this.uid; } + /** + * Setter for texera_db.user_activity.uid. + */ @Override - public void setUid(UInteger uid) { + public void setUid(Integer uid) { this.uid = uid; } + /** + * Getter for texera_db.user_activity.id. + */ @Override - public UInteger getId() { + public Integer getId() { return this.id; } + /** + * Setter for texera_db.user_activity.id. + */ @Override - public void setId(UInteger id) { + public void setId(Integer id) { this.id = id; } + /** + * Getter for texera_db.user_activity.type. + */ @Override public String getType() { return this.type; } + /** + * Setter for texera_db.user_activity.type. + */ @Override public void setType(String type) { this.type = type; } + /** + * Getter for texera_db.user_activity.ip. + */ @Override public String getIp() { return this.ip; } + /** + * Setter for texera_db.user_activity.ip. + */ @Override public void setIp(String ip) { this.ip = ip; } + /** + * Getter for texera_db.user_activity.activate. + */ @Override public String getActivate() { return this.activate; } + /** + * Setter for texera_db.user_activity.activate. + */ @Override public void setActivate(String activate) { this.activate = activate; } + /** + * Getter for texera_db.user_activity.activity_time. + */ @Override public Timestamp getActivityTime() { return this.activityTime; } + /** + * Setter for texera_db.user_activity.activity_time. + */ @Override public void setActivityTime(Timestamp activityTime) { this.activityTime = activityTime; diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/UserConfig.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/UserConfig.java index 27192fef616..aa2d2ec7133 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/UserConfig.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/UserConfig.java @@ -6,8 +6,6 @@ import edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IUserConfig; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -15,11 +13,11 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class UserConfig implements IUserConfig { - private static final long serialVersionUID = -1727133341; + private static final long serialVersionUID = 1L; - private UInteger uid; - private String key; - private String value; + private Integer uid; + private String key; + private String value; public UserConfig() {} @@ -30,40 +28,58 @@ public UserConfig(IUserConfig value) { } public UserConfig( - UInteger uid, - String key, - String value + Integer uid, + String key, + String value ) { this.uid = uid; this.key = key; this.value = value; } + /** + * Getter for texera_db.user_config.uid. + */ @Override - public UInteger getUid() { + public Integer getUid() { return this.uid; } + /** + * Setter for texera_db.user_config.uid. + */ @Override - public void setUid(UInteger uid) { + public void setUid(Integer uid) { this.uid = uid; } + /** + * Getter for texera_db.user_config.key. + */ @Override public String getKey() { return this.key; } + /** + * Setter for texera_db.user_config.key. + */ @Override public void setKey(String key) { this.key = key; } + /** + * Getter for texera_db.user_config.value. + */ @Override public String getValue() { return this.value; } + /** + * Setter for texera_db.user_config.value. + */ @Override public void setValue(String value) { this.value = value; diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/Workflow.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/Workflow.java index bdd7236748d..ebe14912d8a 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/Workflow.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/Workflow.java @@ -8,8 +8,6 @@ import java.sql.Timestamp; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -17,22 +15,22 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class Workflow implements IWorkflow { - private static final long serialVersionUID = 1973264418; + private static final long serialVersionUID = 1L; + private Integer wid; private String name; private String description; - private UInteger wid; private String content; private Timestamp creationTime; private Timestamp lastModifiedTime; - private Byte isPublic; + private Boolean isPublic; public Workflow() {} public Workflow(IWorkflow value) { + this.wid = value.getWid(); this.name = value.getName(); this.description = value.getDescription(); - this.wid = value.getWid(); this.content = value.getContent(); this.creationTime = value.getCreationTime(); this.lastModifiedTime = value.getLastModifiedTime(); @@ -40,90 +38,132 @@ public Workflow(IWorkflow value) { } public Workflow( + Integer wid, String name, String description, - UInteger wid, String content, Timestamp creationTime, Timestamp lastModifiedTime, - Byte isPublic + Boolean isPublic ) { + this.wid = wid; this.name = name; this.description = description; - this.wid = wid; this.content = content; this.creationTime = creationTime; this.lastModifiedTime = lastModifiedTime; this.isPublic = isPublic; } + /** + * Getter for texera_db.workflow.wid. + */ + @Override + public Integer getWid() { + return this.wid; + } + + /** + * Setter for texera_db.workflow.wid. + */ + @Override + public void setWid(Integer wid) { + this.wid = wid; + } + + /** + * Getter for texera_db.workflow.name. + */ @Override public String getName() { return this.name; } + /** + * Setter for texera_db.workflow.name. + */ @Override public void setName(String name) { this.name = name; } + /** + * Getter for texera_db.workflow.description. + */ @Override public String getDescription() { return this.description; } + /** + * Setter for texera_db.workflow.description. + */ @Override public void setDescription(String description) { this.description = description; } - @Override - public UInteger getWid() { - return this.wid; - } - - @Override - public void setWid(UInteger wid) { - this.wid = wid; - } - + /** + * Getter for texera_db.workflow.content. + */ @Override public String getContent() { return this.content; } + /** + * Setter for texera_db.workflow.content. + */ @Override public void setContent(String content) { this.content = content; } + /** + * Getter for texera_db.workflow.creation_time. + */ @Override public Timestamp getCreationTime() { return this.creationTime; } + /** + * Setter for texera_db.workflow.creation_time. + */ @Override public void setCreationTime(Timestamp creationTime) { this.creationTime = creationTime; } + /** + * Getter for texera_db.workflow.last_modified_time. + */ @Override public Timestamp getLastModifiedTime() { return this.lastModifiedTime; } + /** + * Setter for texera_db.workflow.last_modified_time. + */ @Override public void setLastModifiedTime(Timestamp lastModifiedTime) { this.lastModifiedTime = lastModifiedTime; } + /** + * Getter for texera_db.workflow.is_public. + */ @Override - public Byte getIsPublic() { + public Boolean getIsPublic() { return this.isPublic; } + /** + * Setter for texera_db.workflow.is_public. + */ @Override - public void setIsPublic(Byte isPublic) { + public void setIsPublic(Boolean isPublic) { this.isPublic = isPublic; } @@ -131,9 +171,9 @@ public void setIsPublic(Byte isPublic) { public String toString() { StringBuilder sb = new StringBuilder("Workflow ("); - sb.append(name); + sb.append(wid); + sb.append(", ").append(name); sb.append(", ").append(description); - sb.append(", ").append(wid); sb.append(", ").append(content); sb.append(", ").append(creationTime); sb.append(", ").append(lastModifiedTime); @@ -149,9 +189,9 @@ public String toString() { @Override public void from(IWorkflow from) { + setWid(from.getWid()); setName(from.getName()); setDescription(from.getDescription()); - setWid(from.getWid()); setContent(from.getContent()); setCreationTime(from.getCreationTime()); setLastModifiedTime(from.getLastModifiedTime()); diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/WorkflowExecutions.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/WorkflowExecutions.java index d80d5987d6e..d8064b883d1 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/WorkflowExecutions.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/WorkflowExecutions.java @@ -8,8 +8,6 @@ import java.sql.Timestamp; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -17,16 +15,16 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class WorkflowExecutions implements IWorkflowExecutions { - private static final long serialVersionUID = 1258377197; + private static final long serialVersionUID = 1L; - private UInteger eid; - private UInteger vid; - private UInteger uid; - private Byte status; + private Integer eid; + private Integer vid; + private Integer uid; + private Short status; private String result; private Timestamp startingTime; private Timestamp lastUpdateTime; - private Byte bookmarked; + private Boolean bookmarked; private String name; private String environmentVersion; private String logLocation; @@ -50,14 +48,14 @@ public WorkflowExecutions(IWorkflowExecutions value) { } public WorkflowExecutions( - UInteger eid, - UInteger vid, - UInteger uid, - Byte status, + Integer eid, + Integer vid, + Integer uid, + Short status, String result, Timestamp startingTime, Timestamp lastUpdateTime, - Byte bookmarked, + Boolean bookmarked, String name, String environmentVersion, String logLocation, @@ -77,121 +75,195 @@ public WorkflowExecutions( this.runtimeStatsUri = runtimeStatsUri; } + /** + * Getter for texera_db.workflow_executions.eid. + */ @Override - public UInteger getEid() { + public Integer getEid() { return this.eid; } + /** + * Setter for texera_db.workflow_executions.eid. + */ @Override - public void setEid(UInteger eid) { + public void setEid(Integer eid) { this.eid = eid; } + /** + * Getter for texera_db.workflow_executions.vid. + */ @Override - public UInteger getVid() { + public Integer getVid() { return this.vid; } + /** + * Setter for texera_db.workflow_executions.vid. + */ @Override - public void setVid(UInteger vid) { + public void setVid(Integer vid) { this.vid = vid; } + /** + * Getter for texera_db.workflow_executions.uid. + */ @Override - public UInteger getUid() { + public Integer getUid() { return this.uid; } + /** + * Setter for texera_db.workflow_executions.uid. + */ @Override - public void setUid(UInteger uid) { + public void setUid(Integer uid) { this.uid = uid; } + /** + * Getter for texera_db.workflow_executions.status. + */ @Override - public Byte getStatus() { + public Short getStatus() { return this.status; } + /** + * Setter for texera_db.workflow_executions.status. + */ @Override - public void setStatus(Byte status) { + public void setStatus(Short status) { this.status = status; } + /** + * Getter for texera_db.workflow_executions.result. + */ @Override public String getResult() { return this.result; } + /** + * Setter for texera_db.workflow_executions.result. + */ @Override public void setResult(String result) { this.result = result; } + /** + * Getter for texera_db.workflow_executions.starting_time. + */ @Override public Timestamp getStartingTime() { return this.startingTime; } + /** + * Setter for texera_db.workflow_executions.starting_time. + */ @Override public void setStartingTime(Timestamp startingTime) { this.startingTime = startingTime; } + /** + * Getter for texera_db.workflow_executions.last_update_time. + */ @Override public Timestamp getLastUpdateTime() { return this.lastUpdateTime; } + /** + * Setter for texera_db.workflow_executions.last_update_time. + */ @Override public void setLastUpdateTime(Timestamp lastUpdateTime) { this.lastUpdateTime = lastUpdateTime; } + /** + * Getter for texera_db.workflow_executions.bookmarked. + */ @Override - public Byte getBookmarked() { + public Boolean getBookmarked() { return this.bookmarked; } + /** + * Setter for texera_db.workflow_executions.bookmarked. + */ @Override - public void setBookmarked(Byte bookmarked) { + public void setBookmarked(Boolean bookmarked) { this.bookmarked = bookmarked; } + /** + * Getter for texera_db.workflow_executions.name. + */ @Override public String getName() { return this.name; } + /** + * Setter for texera_db.workflow_executions.name. + */ @Override public void setName(String name) { this.name = name; } + /** + * Getter for + * texera_db.workflow_executions.environment_version. + */ @Override public String getEnvironmentVersion() { return this.environmentVersion; } + /** + * Setter for + * texera_db.workflow_executions.environment_version. + */ @Override public void setEnvironmentVersion(String environmentVersion) { this.environmentVersion = environmentVersion; } + /** + * Getter for texera_db.workflow_executions.log_location. + */ @Override public String getLogLocation() { return this.logLocation; } + /** + * Setter for texera_db.workflow_executions.log_location. + */ @Override public void setLogLocation(String logLocation) { this.logLocation = logLocation; } + /** + * Getter for texera_db.workflow_executions.runtime_stats_uri. + */ @Override public String getRuntimeStatsUri() { return this.runtimeStatsUri; } + /** + * Setter for texera_db.workflow_executions.runtime_stats_uri. + */ @Override public void setRuntimeStatsUri(String runtimeStatsUri) { this.runtimeStatsUri = runtimeStatsUri; diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/WorkflowOfProject.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/WorkflowOfProject.java index 2e1e530bccd..b6a23d19bac 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/WorkflowOfProject.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/WorkflowOfProject.java @@ -6,8 +6,6 @@ import edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IWorkflowOfProject; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -15,10 +13,10 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class WorkflowOfProject implements IWorkflowOfProject { - private static final long serialVersionUID = -1232118750; + private static final long serialVersionUID = 1L; - private UInteger wid; - private UInteger pid; + private Integer wid; + private Integer pid; public WorkflowOfProject() {} @@ -28,30 +26,42 @@ public WorkflowOfProject(IWorkflowOfProject value) { } public WorkflowOfProject( - UInteger wid, - UInteger pid + Integer wid, + Integer pid ) { this.wid = wid; this.pid = pid; } + /** + * Getter for texera_db.workflow_of_project.wid. + */ @Override - public UInteger getWid() { + public Integer getWid() { return this.wid; } + /** + * Setter for texera_db.workflow_of_project.wid. + */ @Override - public void setWid(UInteger wid) { + public void setWid(Integer wid) { this.wid = wid; } + /** + * Getter for texera_db.workflow_of_project.pid. + */ @Override - public UInteger getPid() { + public Integer getPid() { return this.pid; } + /** + * Setter for texera_db.workflow_of_project.pid. + */ @Override - public void setPid(UInteger pid) { + public void setPid(Integer pid) { this.pid = pid; } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/WorkflowOfUser.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/WorkflowOfUser.java index 342f66fba00..ed35d454156 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/WorkflowOfUser.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/WorkflowOfUser.java @@ -6,8 +6,6 @@ import edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IWorkflowOfUser; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -15,10 +13,10 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class WorkflowOfUser implements IWorkflowOfUser { - private static final long serialVersionUID = 1424988103; + private static final long serialVersionUID = 1L; - private UInteger uid; - private UInteger wid; + private Integer uid; + private Integer wid; public WorkflowOfUser() {} @@ -28,30 +26,42 @@ public WorkflowOfUser(IWorkflowOfUser value) { } public WorkflowOfUser( - UInteger uid, - UInteger wid + Integer uid, + Integer wid ) { this.uid = uid; this.wid = wid; } + /** + * Getter for texera_db.workflow_of_user.uid. + */ @Override - public UInteger getUid() { + public Integer getUid() { return this.uid; } + /** + * Setter for texera_db.workflow_of_user.uid. + */ @Override - public void setUid(UInteger uid) { + public void setUid(Integer uid) { this.uid = uid; } + /** + * Getter for texera_db.workflow_of_user.wid. + */ @Override - public UInteger getWid() { + public Integer getWid() { return this.wid; } + /** + * Setter for texera_db.workflow_of_user.wid. + */ @Override - public void setWid(UInteger wid) { + public void setWid(Integer wid) { this.wid = wid; } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/WorkflowUserAccess.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/WorkflowUserAccess.java index 63c3ce336f5..2abaf3090f0 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/WorkflowUserAccess.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/WorkflowUserAccess.java @@ -4,11 +4,9 @@ package edu.uci.ics.texera.dao.jooq.generated.tables.pojos; -import edu.uci.ics.texera.dao.jooq.generated.enums.WorkflowUserAccessPrivilege; +import edu.uci.ics.texera.dao.jooq.generated.enums.PrivilegeEnum; import edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IWorkflowUserAccess; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -16,11 +14,11 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class WorkflowUserAccess implements IWorkflowUserAccess { - private static final long serialVersionUID = 1451132866; + private static final long serialVersionUID = 1L; - private UInteger uid; - private UInteger wid; - private WorkflowUserAccessPrivilege privilege; + private Integer uid; + private Integer wid; + private PrivilegeEnum privilege; public WorkflowUserAccess() {} @@ -31,42 +29,60 @@ public WorkflowUserAccess(IWorkflowUserAccess value) { } public WorkflowUserAccess( - UInteger uid, - UInteger wid, - WorkflowUserAccessPrivilege privilege + Integer uid, + Integer wid, + PrivilegeEnum privilege ) { this.uid = uid; this.wid = wid; this.privilege = privilege; } + /** + * Getter for texera_db.workflow_user_access.uid. + */ @Override - public UInteger getUid() { + public Integer getUid() { return this.uid; } + /** + * Setter for texera_db.workflow_user_access.uid. + */ @Override - public void setUid(UInteger uid) { + public void setUid(Integer uid) { this.uid = uid; } + /** + * Getter for texera_db.workflow_user_access.wid. + */ @Override - public UInteger getWid() { + public Integer getWid() { return this.wid; } + /** + * Setter for texera_db.workflow_user_access.wid. + */ @Override - public void setWid(UInteger wid) { + public void setWid(Integer wid) { this.wid = wid; } + /** + * Getter for texera_db.workflow_user_access.privilege. + */ @Override - public WorkflowUserAccessPrivilege getPrivilege() { + public PrivilegeEnum getPrivilege() { return this.privilege; } + /** + * Setter for texera_db.workflow_user_access.privilege. + */ @Override - public void setPrivilege(WorkflowUserAccessPrivilege privilege) { + public void setPrivilege(PrivilegeEnum privilege) { this.privilege = privilege; } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/WorkflowUserClones.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/WorkflowUserClones.java index 9a75d18c508..aabfe032d95 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/WorkflowUserClones.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/WorkflowUserClones.java @@ -6,8 +6,6 @@ import edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IWorkflowUserClones; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -15,10 +13,10 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class WorkflowUserClones implements IWorkflowUserClones { - private static final long serialVersionUID = -1977537463; + private static final long serialVersionUID = 1L; - private UInteger uid; - private UInteger wid; + private Integer uid; + private Integer wid; public WorkflowUserClones() {} @@ -28,30 +26,42 @@ public WorkflowUserClones(IWorkflowUserClones value) { } public WorkflowUserClones( - UInteger uid, - UInteger wid + Integer uid, + Integer wid ) { this.uid = uid; this.wid = wid; } + /** + * Getter for texera_db.workflow_user_clones.uid. + */ @Override - public UInteger getUid() { + public Integer getUid() { return this.uid; } + /** + * Setter for texera_db.workflow_user_clones.uid. + */ @Override - public void setUid(UInteger uid) { + public void setUid(Integer uid) { this.uid = uid; } + /** + * Getter for texera_db.workflow_user_clones.wid. + */ @Override - public UInteger getWid() { + public Integer getWid() { return this.wid; } + /** + * Setter for texera_db.workflow_user_clones.wid. + */ @Override - public void setWid(UInteger wid) { + public void setWid(Integer wid) { this.wid = wid; } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/WorkflowUserLikes.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/WorkflowUserLikes.java index 9ba51016d1c..0a1e6eba99b 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/WorkflowUserLikes.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/WorkflowUserLikes.java @@ -6,8 +6,6 @@ import edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IWorkflowUserLikes; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -15,10 +13,10 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class WorkflowUserLikes implements IWorkflowUserLikes { - private static final long serialVersionUID = 150648739; + private static final long serialVersionUID = 1L; - private UInteger uid; - private UInteger wid; + private Integer uid; + private Integer wid; public WorkflowUserLikes() {} @@ -28,30 +26,42 @@ public WorkflowUserLikes(IWorkflowUserLikes value) { } public WorkflowUserLikes( - UInteger uid, - UInteger wid + Integer uid, + Integer wid ) { this.uid = uid; this.wid = wid; } + /** + * Getter for texera_db.workflow_user_likes.uid. + */ @Override - public UInteger getUid() { + public Integer getUid() { return this.uid; } + /** + * Setter for texera_db.workflow_user_likes.uid. + */ @Override - public void setUid(UInteger uid) { + public void setUid(Integer uid) { this.uid = uid; } + /** + * Getter for texera_db.workflow_user_likes.wid. + */ @Override - public UInteger getWid() { + public Integer getWid() { return this.wid; } + /** + * Setter for texera_db.workflow_user_likes.wid. + */ @Override - public void setWid(UInteger wid) { + public void setWid(Integer wid) { this.wid = wid; } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/WorkflowVersion.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/WorkflowVersion.java index 8cf0f59d91c..cc51df39dbc 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/WorkflowVersion.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/WorkflowVersion.java @@ -8,8 +8,6 @@ import java.sql.Timestamp; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -17,10 +15,10 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class WorkflowVersion implements IWorkflowVersion { - private static final long serialVersionUID = -657374951; + private static final long serialVersionUID = 1L; - private UInteger vid; - private UInteger wid; + private Integer vid; + private Integer wid; private String content; private Timestamp creationTime; @@ -34,8 +32,8 @@ public WorkflowVersion(IWorkflowVersion value) { } public WorkflowVersion( - UInteger vid, - UInteger wid, + Integer vid, + Integer wid, String content, Timestamp creationTime ) { @@ -45,41 +43,65 @@ public WorkflowVersion( this.creationTime = creationTime; } + /** + * Getter for texera_db.workflow_version.vid. + */ @Override - public UInteger getVid() { + public Integer getVid() { return this.vid; } + /** + * Setter for texera_db.workflow_version.vid. + */ @Override - public void setVid(UInteger vid) { + public void setVid(Integer vid) { this.vid = vid; } + /** + * Getter for texera_db.workflow_version.wid. + */ @Override - public UInteger getWid() { + public Integer getWid() { return this.wid; } + /** + * Setter for texera_db.workflow_version.wid. + */ @Override - public void setWid(UInteger wid) { + public void setWid(Integer wid) { this.wid = wid; } + /** + * Getter for texera_db.workflow_version.content. + */ @Override public String getContent() { return this.content; } + /** + * Setter for texera_db.workflow_version.content. + */ @Override public void setContent(String content) { this.content = content; } + /** + * Getter for texera_db.workflow_version.creation_time. + */ @Override public Timestamp getCreationTime() { return this.creationTime; } + /** + * Setter for texera_db.workflow_version.creation_time. + */ @Override public void setCreationTime(Timestamp creationTime) { this.creationTime = creationTime; diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/WorkflowViewCount.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/WorkflowViewCount.java index 1d127edb1c1..5359c721050 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/WorkflowViewCount.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/pojos/WorkflowViewCount.java @@ -6,8 +6,6 @@ import edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IWorkflowViewCount; -import org.jooq.types.UInteger; - /** * This class is generated by jOOQ. @@ -15,10 +13,10 @@ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class WorkflowViewCount implements IWorkflowViewCount { - private static final long serialVersionUID = -762830743; + private static final long serialVersionUID = 1L; - private UInteger wid; - private UInteger viewCount; + private Integer wid; + private Integer viewCount; public WorkflowViewCount() {} @@ -28,30 +26,42 @@ public WorkflowViewCount(IWorkflowViewCount value) { } public WorkflowViewCount( - UInteger wid, - UInteger viewCount + Integer wid, + Integer viewCount ) { this.wid = wid; this.viewCount = viewCount; } + /** + * Getter for texera_db.workflow_view_count.wid. + */ @Override - public UInteger getWid() { + public Integer getWid() { return this.wid; } + /** + * Setter for texera_db.workflow_view_count.wid. + */ @Override - public void setWid(UInteger wid) { + public void setWid(Integer wid) { this.wid = wid; } + /** + * Getter for texera_db.workflow_view_count.view_count. + */ @Override - public UInteger getViewCount() { + public Integer getViewCount() { return this.viewCount; } + /** + * Setter for texera_db.workflow_view_count.view_count. + */ @Override - public void setViewCount(UInteger viewCount) { + public void setViewCount(Integer viewCount) { this.viewCount = viewCount; } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/DatasetRecord.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/DatasetRecord.java index 48af062468e..2f0dc7cd00a 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/DatasetRecord.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/DatasetRecord.java @@ -14,22 +14,21 @@ import org.jooq.Record6; import org.jooq.Row6; import org.jooq.impl.UpdatableRecordImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class DatasetRecord extends UpdatableRecordImpl implements Record6, IDataset { +public class DatasetRecord extends UpdatableRecordImpl implements Record6, IDataset { - private static final long serialVersionUID = 877971145; + private static final long serialVersionUID = 1L; /** * Setter for texera_db.dataset.did. */ @Override - public void setDid(UInteger value) { + public void setDid(Integer value) { set(0, value); } @@ -37,15 +36,15 @@ public void setDid(UInteger value) { * Getter for texera_db.dataset.did. */ @Override - public UInteger getDid() { - return (UInteger) get(0); + public Integer getDid() { + return (Integer) get(0); } /** * Setter for texera_db.dataset.owner_uid. */ @Override - public void setOwnerUid(UInteger value) { + public void setOwnerUid(Integer value) { set(1, value); } @@ -53,8 +52,8 @@ public void setOwnerUid(UInteger value) { * Getter for texera_db.dataset.owner_uid. */ @Override - public UInteger getOwnerUid() { - return (UInteger) get(1); + public Integer getOwnerUid() { + return (Integer) get(1); } /** @@ -77,7 +76,7 @@ public String getName() { * Setter for texera_db.dataset.is_public. */ @Override - public void setIsPublic(Byte value) { + public void setIsPublic(Boolean value) { set(3, value); } @@ -85,8 +84,8 @@ public void setIsPublic(Byte value) { * Getter for texera_db.dataset.is_public. */ @Override - public Byte getIsPublic() { - return (Byte) get(3); + public Boolean getIsPublic() { + return (Boolean) get(3); } /** @@ -126,7 +125,7 @@ public Timestamp getCreationTime() { // ------------------------------------------------------------------------- @Override - public Record1 key() { + public Record1 key() { return (Record1) super.key(); } @@ -135,22 +134,22 @@ public Record1 key() { // ------------------------------------------------------------------------- @Override - public Row6 fieldsRow() { + public Row6 fieldsRow() { return (Row6) super.fieldsRow(); } @Override - public Row6 valuesRow() { + public Row6 valuesRow() { return (Row6) super.valuesRow(); } @Override - public Field field1() { + public Field field1() { return Dataset.DATASET.DID; } @Override - public Field field2() { + public Field field2() { return Dataset.DATASET.OWNER_UID; } @@ -160,7 +159,7 @@ public Field field3() { } @Override - public Field field4() { + public Field field4() { return Dataset.DATASET.IS_PUBLIC; } @@ -175,12 +174,12 @@ public Field field6() { } @Override - public UInteger component1() { + public Integer component1() { return getDid(); } @Override - public UInteger component2() { + public Integer component2() { return getOwnerUid(); } @@ -190,7 +189,7 @@ public String component3() { } @Override - public Byte component4() { + public Boolean component4() { return getIsPublic(); } @@ -205,12 +204,12 @@ public Timestamp component6() { } @Override - public UInteger value1() { + public Integer value1() { return getDid(); } @Override - public UInteger value2() { + public Integer value2() { return getOwnerUid(); } @@ -220,7 +219,7 @@ public String value3() { } @Override - public Byte value4() { + public Boolean value4() { return getIsPublic(); } @@ -235,13 +234,13 @@ public Timestamp value6() { } @Override - public DatasetRecord value1(UInteger value) { + public DatasetRecord value1(Integer value) { setDid(value); return this; } @Override - public DatasetRecord value2(UInteger value) { + public DatasetRecord value2(Integer value) { setOwnerUid(value); return this; } @@ -253,7 +252,7 @@ public DatasetRecord value3(String value) { } @Override - public DatasetRecord value4(Byte value) { + public DatasetRecord value4(Boolean value) { setIsPublic(value); return this; } @@ -271,7 +270,7 @@ public DatasetRecord value6(Timestamp value) { } @Override - public DatasetRecord values(UInteger value1, UInteger value2, String value3, Byte value4, String value5, Timestamp value6) { + public DatasetRecord values(Integer value1, Integer value2, String value3, Boolean value4, String value5, Timestamp value6) { value1(value1); value2(value2); value3(value3); @@ -315,14 +314,30 @@ public DatasetRecord() { /** * Create a detached, initialised DatasetRecord */ - public DatasetRecord(UInteger did, UInteger ownerUid, String name, Byte isPublic, String description, Timestamp creationTime) { + public DatasetRecord(Integer did, Integer ownerUid, String name, Boolean isPublic, String description, Timestamp creationTime) { super(Dataset.DATASET); - set(0, did); - set(1, ownerUid); - set(2, name); - set(3, isPublic); - set(4, description); - set(5, creationTime); + setDid(did); + setOwnerUid(ownerUid); + setName(name); + setIsPublic(isPublic); + setDescription(description); + setCreationTime(creationTime); + } + + /** + * Create a detached, initialised DatasetRecord + */ + public DatasetRecord(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.Dataset value) { + super(Dataset.DATASET); + + if (value != null) { + setDid(value.getDid()); + setOwnerUid(value.getOwnerUid()); + setName(value.getName()); + setIsPublic(value.getIsPublic()); + setDescription(value.getDescription()); + setCreationTime(value.getCreationTime()); + } } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/DatasetUserAccessRecord.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/DatasetUserAccessRecord.java index 42d2a8280b2..ea8702f5bc0 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/DatasetUserAccessRecord.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/DatasetUserAccessRecord.java @@ -4,7 +4,7 @@ package edu.uci.ics.texera.dao.jooq.generated.tables.records; -import edu.uci.ics.texera.dao.jooq.generated.enums.DatasetUserAccessPrivilege; +import edu.uci.ics.texera.dao.jooq.generated.enums.PrivilegeEnum; import edu.uci.ics.texera.dao.jooq.generated.tables.DatasetUserAccess; import edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IDatasetUserAccess; @@ -13,22 +13,21 @@ import org.jooq.Record3; import org.jooq.Row3; import org.jooq.impl.UpdatableRecordImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class DatasetUserAccessRecord extends UpdatableRecordImpl implements Record3, IDatasetUserAccess { +public class DatasetUserAccessRecord extends UpdatableRecordImpl implements Record3, IDatasetUserAccess { - private static final long serialVersionUID = -349651586; + private static final long serialVersionUID = 1L; /** * Setter for texera_db.dataset_user_access.did. */ @Override - public void setDid(UInteger value) { + public void setDid(Integer value) { set(0, value); } @@ -36,15 +35,15 @@ public void setDid(UInteger value) { * Getter for texera_db.dataset_user_access.did. */ @Override - public UInteger getDid() { - return (UInteger) get(0); + public Integer getDid() { + return (Integer) get(0); } /** * Setter for texera_db.dataset_user_access.uid. */ @Override - public void setUid(UInteger value) { + public void setUid(Integer value) { set(1, value); } @@ -52,15 +51,15 @@ public void setUid(UInteger value) { * Getter for texera_db.dataset_user_access.uid. */ @Override - public UInteger getUid() { - return (UInteger) get(1); + public Integer getUid() { + return (Integer) get(1); } /** * Setter for texera_db.dataset_user_access.privilege. */ @Override - public void setPrivilege(DatasetUserAccessPrivilege value) { + public void setPrivilege(PrivilegeEnum value) { set(2, value); } @@ -68,8 +67,8 @@ public void setPrivilege(DatasetUserAccessPrivilege value) { * Getter for texera_db.dataset_user_access.privilege. */ @Override - public DatasetUserAccessPrivilege getPrivilege() { - return (DatasetUserAccessPrivilege) get(2); + public PrivilegeEnum getPrivilege() { + return (PrivilegeEnum) get(2); } // ------------------------------------------------------------------------- @@ -77,7 +76,7 @@ public DatasetUserAccessPrivilege getPrivilege() { // ------------------------------------------------------------------------- @Override - public Record2 key() { + public Record2 key() { return (Record2) super.key(); } @@ -86,80 +85,80 @@ public Record2 key() { // ------------------------------------------------------------------------- @Override - public Row3 fieldsRow() { + public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } @Override - public Row3 valuesRow() { + public Row3 valuesRow() { return (Row3) super.valuesRow(); } @Override - public Field field1() { + public Field field1() { return DatasetUserAccess.DATASET_USER_ACCESS.DID; } @Override - public Field field2() { + public Field field2() { return DatasetUserAccess.DATASET_USER_ACCESS.UID; } @Override - public Field field3() { + public Field field3() { return DatasetUserAccess.DATASET_USER_ACCESS.PRIVILEGE; } @Override - public UInteger component1() { + public Integer component1() { return getDid(); } @Override - public UInteger component2() { + public Integer component2() { return getUid(); } @Override - public DatasetUserAccessPrivilege component3() { + public PrivilegeEnum component3() { return getPrivilege(); } @Override - public UInteger value1() { + public Integer value1() { return getDid(); } @Override - public UInteger value2() { + public Integer value2() { return getUid(); } @Override - public DatasetUserAccessPrivilege value3() { + public PrivilegeEnum value3() { return getPrivilege(); } @Override - public DatasetUserAccessRecord value1(UInteger value) { + public DatasetUserAccessRecord value1(Integer value) { setDid(value); return this; } @Override - public DatasetUserAccessRecord value2(UInteger value) { + public DatasetUserAccessRecord value2(Integer value) { setUid(value); return this; } @Override - public DatasetUserAccessRecord value3(DatasetUserAccessPrivilege value) { + public DatasetUserAccessRecord value3(PrivilegeEnum value) { setPrivilege(value); return this; } @Override - public DatasetUserAccessRecord values(UInteger value1, UInteger value2, DatasetUserAccessPrivilege value3) { + public DatasetUserAccessRecord values(Integer value1, Integer value2, PrivilegeEnum value3) { value1(value1); value2(value2); value3(value3); @@ -197,11 +196,24 @@ public DatasetUserAccessRecord() { /** * Create a detached, initialised DatasetUserAccessRecord */ - public DatasetUserAccessRecord(UInteger did, UInteger uid, DatasetUserAccessPrivilege privilege) { + public DatasetUserAccessRecord(Integer did, Integer uid, PrivilegeEnum privilege) { super(DatasetUserAccess.DATASET_USER_ACCESS); - set(0, did); - set(1, uid); - set(2, privilege); + setDid(did); + setUid(uid); + setPrivilege(privilege); + } + + /** + * Create a detached, initialised DatasetUserAccessRecord + */ + public DatasetUserAccessRecord(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.DatasetUserAccess value) { + super(DatasetUserAccess.DATASET_USER_ACCESS); + + if (value != null) { + setDid(value.getDid()); + setUid(value.getUid()); + setPrivilege(value.getPrivilege()); + } } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/DatasetUserLikesRecord.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/DatasetUserLikesRecord.java index 1e006ad00c3..e2051e334f1 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/DatasetUserLikesRecord.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/DatasetUserLikesRecord.java @@ -11,22 +11,21 @@ import org.jooq.Record2; import org.jooq.Row2; import org.jooq.impl.UpdatableRecordImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class DatasetUserLikesRecord extends UpdatableRecordImpl implements Record2, IDatasetUserLikes { +public class DatasetUserLikesRecord extends UpdatableRecordImpl implements Record2, IDatasetUserLikes { - private static final long serialVersionUID = -612498918; + private static final long serialVersionUID = 1L; /** * Setter for texera_db.dataset_user_likes.uid. */ @Override - public void setUid(UInteger value) { + public void setUid(Integer value) { set(0, value); } @@ -34,15 +33,15 @@ public void setUid(UInteger value) { * Getter for texera_db.dataset_user_likes.uid. */ @Override - public UInteger getUid() { - return (UInteger) get(0); + public Integer getUid() { + return (Integer) get(0); } /** * Setter for texera_db.dataset_user_likes.did. */ @Override - public void setDid(UInteger value) { + public void setDid(Integer value) { set(1, value); } @@ -50,8 +49,8 @@ public void setDid(UInteger value) { * Getter for texera_db.dataset_user_likes.did. */ @Override - public UInteger getDid() { - return (UInteger) get(1); + public Integer getDid() { + return (Integer) get(1); } // ------------------------------------------------------------------------- @@ -59,7 +58,7 @@ public UInteger getDid() { // ------------------------------------------------------------------------- @Override - public Record2 key() { + public Record2 key() { return (Record2) super.key(); } @@ -68,59 +67,59 @@ public Record2 key() { // ------------------------------------------------------------------------- @Override - public Row2 fieldsRow() { + public Row2 fieldsRow() { return (Row2) super.fieldsRow(); } @Override - public Row2 valuesRow() { + public Row2 valuesRow() { return (Row2) super.valuesRow(); } @Override - public Field field1() { + public Field field1() { return DatasetUserLikes.DATASET_USER_LIKES.UID; } @Override - public Field field2() { + public Field field2() { return DatasetUserLikes.DATASET_USER_LIKES.DID; } @Override - public UInteger component1() { + public Integer component1() { return getUid(); } @Override - public UInteger component2() { + public Integer component2() { return getDid(); } @Override - public UInteger value1() { + public Integer value1() { return getUid(); } @Override - public UInteger value2() { + public Integer value2() { return getDid(); } @Override - public DatasetUserLikesRecord value1(UInteger value) { + public DatasetUserLikesRecord value1(Integer value) { setUid(value); return this; } @Override - public DatasetUserLikesRecord value2(UInteger value) { + public DatasetUserLikesRecord value2(Integer value) { setDid(value); return this; } @Override - public DatasetUserLikesRecord values(UInteger value1, UInteger value2) { + public DatasetUserLikesRecord values(Integer value1, Integer value2) { value1(value1); value2(value2); return this; @@ -156,10 +155,22 @@ public DatasetUserLikesRecord() { /** * Create a detached, initialised DatasetUserLikesRecord */ - public DatasetUserLikesRecord(UInteger uid, UInteger did) { + public DatasetUserLikesRecord(Integer uid, Integer did) { super(DatasetUserLikes.DATASET_USER_LIKES); - set(0, uid); - set(1, did); + setUid(uid); + setDid(did); + } + + /** + * Create a detached, initialised DatasetUserLikesRecord + */ + public DatasetUserLikesRecord(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.DatasetUserLikes value) { + super(DatasetUserLikes.DATASET_USER_LIKES); + + if (value != null) { + setUid(value.getUid()); + setDid(value.getDid()); + } } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/DatasetVersionRecord.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/DatasetVersionRecord.java index cb66d5b8f9c..987c19a8caa 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/DatasetVersionRecord.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/DatasetVersionRecord.java @@ -14,22 +14,21 @@ import org.jooq.Record6; import org.jooq.Row6; import org.jooq.impl.UpdatableRecordImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class DatasetVersionRecord extends UpdatableRecordImpl implements Record6, IDatasetVersion { +public class DatasetVersionRecord extends UpdatableRecordImpl implements Record6, IDatasetVersion { - private static final long serialVersionUID = 1436579649; + private static final long serialVersionUID = 1L; /** * Setter for texera_db.dataset_version.dvid. */ @Override - public void setDvid(UInteger value) { + public void setDvid(Integer value) { set(0, value); } @@ -37,15 +36,15 @@ public void setDvid(UInteger value) { * Getter for texera_db.dataset_version.dvid. */ @Override - public UInteger getDvid() { - return (UInteger) get(0); + public Integer getDvid() { + return (Integer) get(0); } /** * Setter for texera_db.dataset_version.did. */ @Override - public void setDid(UInteger value) { + public void setDid(Integer value) { set(1, value); } @@ -53,15 +52,15 @@ public void setDid(UInteger value) { * Getter for texera_db.dataset_version.did. */ @Override - public UInteger getDid() { - return (UInteger) get(1); + public Integer getDid() { + return (Integer) get(1); } /** * Setter for texera_db.dataset_version.creator_uid. */ @Override - public void setCreatorUid(UInteger value) { + public void setCreatorUid(Integer value) { set(2, value); } @@ -69,8 +68,8 @@ public void setCreatorUid(UInteger value) { * Getter for texera_db.dataset_version.creator_uid. */ @Override - public UInteger getCreatorUid() { - return (UInteger) get(2); + public Integer getCreatorUid() { + return (Integer) get(2); } /** @@ -126,7 +125,7 @@ public Timestamp getCreationTime() { // ------------------------------------------------------------------------- @Override - public Record1 key() { + public Record1 key() { return (Record1) super.key(); } @@ -135,27 +134,27 @@ public Record1 key() { // ------------------------------------------------------------------------- @Override - public Row6 fieldsRow() { + public Row6 fieldsRow() { return (Row6) super.fieldsRow(); } @Override - public Row6 valuesRow() { + public Row6 valuesRow() { return (Row6) super.valuesRow(); } @Override - public Field field1() { + public Field field1() { return DatasetVersion.DATASET_VERSION.DVID; } @Override - public Field field2() { + public Field field2() { return DatasetVersion.DATASET_VERSION.DID; } @Override - public Field field3() { + public Field field3() { return DatasetVersion.DATASET_VERSION.CREATOR_UID; } @@ -175,17 +174,17 @@ public Field field6() { } @Override - public UInteger component1() { + public Integer component1() { return getDvid(); } @Override - public UInteger component2() { + public Integer component2() { return getDid(); } @Override - public UInteger component3() { + public Integer component3() { return getCreatorUid(); } @@ -205,17 +204,17 @@ public Timestamp component6() { } @Override - public UInteger value1() { + public Integer value1() { return getDvid(); } @Override - public UInteger value2() { + public Integer value2() { return getDid(); } @Override - public UInteger value3() { + public Integer value3() { return getCreatorUid(); } @@ -235,19 +234,19 @@ public Timestamp value6() { } @Override - public DatasetVersionRecord value1(UInteger value) { + public DatasetVersionRecord value1(Integer value) { setDvid(value); return this; } @Override - public DatasetVersionRecord value2(UInteger value) { + public DatasetVersionRecord value2(Integer value) { setDid(value); return this; } @Override - public DatasetVersionRecord value3(UInteger value) { + public DatasetVersionRecord value3(Integer value) { setCreatorUid(value); return this; } @@ -271,7 +270,7 @@ public DatasetVersionRecord value6(Timestamp value) { } @Override - public DatasetVersionRecord values(UInteger value1, UInteger value2, UInteger value3, String value4, String value5, Timestamp value6) { + public DatasetVersionRecord values(Integer value1, Integer value2, Integer value3, String value4, String value5, Timestamp value6) { value1(value1); value2(value2); value3(value3); @@ -315,14 +314,30 @@ public DatasetVersionRecord() { /** * Create a detached, initialised DatasetVersionRecord */ - public DatasetVersionRecord(UInteger dvid, UInteger did, UInteger creatorUid, String name, String versionHash, Timestamp creationTime) { + public DatasetVersionRecord(Integer dvid, Integer did, Integer creatorUid, String name, String versionHash, Timestamp creationTime) { super(DatasetVersion.DATASET_VERSION); - set(0, dvid); - set(1, did); - set(2, creatorUid); - set(3, name); - set(4, versionHash); - set(5, creationTime); + setDvid(dvid); + setDid(did); + setCreatorUid(creatorUid); + setName(name); + setVersionHash(versionHash); + setCreationTime(creationTime); + } + + /** + * Create a detached, initialised DatasetVersionRecord + */ + public DatasetVersionRecord(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.DatasetVersion value) { + super(DatasetVersion.DATASET_VERSION); + + if (value != null) { + setDvid(value.getDvid()); + setDid(value.getDid()); + setCreatorUid(value.getCreatorUid()); + setName(value.getName()); + setVersionHash(value.getVersionHash()); + setCreationTime(value.getCreationTime()); + } } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/DatasetViewCountRecord.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/DatasetViewCountRecord.java index a8234b60894..ef590d5292d 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/DatasetViewCountRecord.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/DatasetViewCountRecord.java @@ -12,22 +12,21 @@ import org.jooq.Record2; import org.jooq.Row2; import org.jooq.impl.UpdatableRecordImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class DatasetViewCountRecord extends UpdatableRecordImpl implements Record2, IDatasetViewCount { +public class DatasetViewCountRecord extends UpdatableRecordImpl implements Record2, IDatasetViewCount { - private static final long serialVersionUID = -1848694937; + private static final long serialVersionUID = 1L; /** * Setter for texera_db.dataset_view_count.did. */ @Override - public void setDid(UInteger value) { + public void setDid(Integer value) { set(0, value); } @@ -35,15 +34,15 @@ public void setDid(UInteger value) { * Getter for texera_db.dataset_view_count.did. */ @Override - public UInteger getDid() { - return (UInteger) get(0); + public Integer getDid() { + return (Integer) get(0); } /** * Setter for texera_db.dataset_view_count.view_count. */ @Override - public void setViewCount(UInteger value) { + public void setViewCount(Integer value) { set(1, value); } @@ -51,8 +50,8 @@ public void setViewCount(UInteger value) { * Getter for texera_db.dataset_view_count.view_count. */ @Override - public UInteger getViewCount() { - return (UInteger) get(1); + public Integer getViewCount() { + return (Integer) get(1); } // ------------------------------------------------------------------------- @@ -60,7 +59,7 @@ public UInteger getViewCount() { // ------------------------------------------------------------------------- @Override - public Record1 key() { + public Record1 key() { return (Record1) super.key(); } @@ -69,59 +68,59 @@ public Record1 key() { // ------------------------------------------------------------------------- @Override - public Row2 fieldsRow() { + public Row2 fieldsRow() { return (Row2) super.fieldsRow(); } @Override - public Row2 valuesRow() { + public Row2 valuesRow() { return (Row2) super.valuesRow(); } @Override - public Field field1() { + public Field field1() { return DatasetViewCount.DATASET_VIEW_COUNT.DID; } @Override - public Field field2() { + public Field field2() { return DatasetViewCount.DATASET_VIEW_COUNT.VIEW_COUNT; } @Override - public UInteger component1() { + public Integer component1() { return getDid(); } @Override - public UInteger component2() { + public Integer component2() { return getViewCount(); } @Override - public UInteger value1() { + public Integer value1() { return getDid(); } @Override - public UInteger value2() { + public Integer value2() { return getViewCount(); } @Override - public DatasetViewCountRecord value1(UInteger value) { + public DatasetViewCountRecord value1(Integer value) { setDid(value); return this; } @Override - public DatasetViewCountRecord value2(UInteger value) { + public DatasetViewCountRecord value2(Integer value) { setViewCount(value); return this; } @Override - public DatasetViewCountRecord values(UInteger value1, UInteger value2) { + public DatasetViewCountRecord values(Integer value1, Integer value2) { value1(value1); value2(value2); return this; @@ -157,10 +156,22 @@ public DatasetViewCountRecord() { /** * Create a detached, initialised DatasetViewCountRecord */ - public DatasetViewCountRecord(UInteger did, UInteger viewCount) { + public DatasetViewCountRecord(Integer did, Integer viewCount) { super(DatasetViewCount.DATASET_VIEW_COUNT); - set(0, did); - set(1, viewCount); + setDid(did); + setViewCount(viewCount); + } + + /** + * Create a detached, initialised DatasetViewCountRecord + */ + public DatasetViewCountRecord(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.DatasetViewCount value) { + super(DatasetViewCount.DATASET_VIEW_COUNT); + + if (value != null) { + setDid(value.getDid()); + setViewCount(value.getViewCount()); + } } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/OperatorExecutionsRecord.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/OperatorExecutionsRecord.java index 318ee79b2ef..af4c0d6953c 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/OperatorExecutionsRecord.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/OperatorExecutionsRecord.java @@ -8,34 +8,36 @@ import edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IOperatorExecutions; import org.jooq.Field; +import org.jooq.Record2; import org.jooq.Record3; import org.jooq.Row3; -import org.jooq.impl.TableRecordImpl; -import org.jooq.types.UInteger; +import org.jooq.impl.UpdatableRecordImpl; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class OperatorExecutionsRecord extends TableRecordImpl implements Record3, IOperatorExecutions { +public class OperatorExecutionsRecord extends UpdatableRecordImpl implements Record3, IOperatorExecutions { - private static final long serialVersionUID = -930651648; + private static final long serialVersionUID = 1L; /** - * Setter for texera_db.operator_executions.workflow_execution_id. + * Setter for + * texera_db.operator_executions.workflow_execution_id. */ @Override - public void setWorkflowExecutionId(UInteger value) { + public void setWorkflowExecutionId(Integer value) { set(0, value); } /** - * Getter for texera_db.operator_executions.workflow_execution_id. + * Getter for + * texera_db.operator_executions.workflow_execution_id. */ @Override - public UInteger getWorkflowExecutionId() { - return (UInteger) get(0); + public Integer getWorkflowExecutionId() { + return (Integer) get(0); } /** @@ -55,7 +57,8 @@ public String getOperatorId() { } /** - * Setter for texera_db.operator_executions.console_messages_uri. + * Setter for + * texera_db.operator_executions.console_messages_uri. */ @Override public void setConsoleMessagesUri(String value) { @@ -63,29 +66,39 @@ public void setConsoleMessagesUri(String value) { } /** - * Getter for texera_db.operator_executions.console_messages_uri. + * Getter for + * texera_db.operator_executions.console_messages_uri. */ @Override public String getConsoleMessagesUri() { return (String) get(2); } + // ------------------------------------------------------------------------- + // Primary key information + // ------------------------------------------------------------------------- + + @Override + public Record2 key() { + return (Record2) super.key(); + } + // ------------------------------------------------------------------------- // Record3 type implementation // ------------------------------------------------------------------------- @Override - public Row3 fieldsRow() { + public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } @Override - public Row3 valuesRow() { + public Row3 valuesRow() { return (Row3) super.valuesRow(); } @Override - public Field field1() { + public Field field1() { return OperatorExecutions.OPERATOR_EXECUTIONS.WORKFLOW_EXECUTION_ID; } @@ -100,7 +113,7 @@ public Field field3() { } @Override - public UInteger component1() { + public Integer component1() { return getWorkflowExecutionId(); } @@ -115,7 +128,7 @@ public String component3() { } @Override - public UInteger value1() { + public Integer value1() { return getWorkflowExecutionId(); } @@ -130,7 +143,7 @@ public String value3() { } @Override - public OperatorExecutionsRecord value1(UInteger value) { + public OperatorExecutionsRecord value1(Integer value) { setWorkflowExecutionId(value); return this; } @@ -148,7 +161,7 @@ public OperatorExecutionsRecord value3(String value) { } @Override - public OperatorExecutionsRecord values(UInteger value1, String value2, String value3) { + public OperatorExecutionsRecord values(Integer value1, String value2, String value3) { value1(value1); value2(value2); value3(value3); @@ -186,11 +199,24 @@ public OperatorExecutionsRecord() { /** * Create a detached, initialised OperatorExecutionsRecord */ - public OperatorExecutionsRecord(UInteger workflowExecutionId, String operatorId, String consoleMessagesUri) { + public OperatorExecutionsRecord(Integer workflowExecutionId, String operatorId, String consoleMessagesUri) { + super(OperatorExecutions.OPERATOR_EXECUTIONS); + + setWorkflowExecutionId(workflowExecutionId); + setOperatorId(operatorId); + setConsoleMessagesUri(consoleMessagesUri); + } + + /** + * Create a detached, initialised OperatorExecutionsRecord + */ + public OperatorExecutionsRecord(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.OperatorExecutions value) { super(OperatorExecutions.OPERATOR_EXECUTIONS); - set(0, workflowExecutionId); - set(1, operatorId); - set(2, consoleMessagesUri); + if (value != null) { + setWorkflowExecutionId(value.getWorkflowExecutionId()); + setOperatorId(value.getOperatorId()); + setConsoleMessagesUri(value.getConsoleMessagesUri()); + } } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/OperatorPortExecutionsRecord.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/OperatorPortExecutionsRecord.java index d05ba339cb4..cba7f79c15a 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/OperatorPortExecutionsRecord.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/OperatorPortExecutionsRecord.java @@ -8,34 +8,36 @@ import edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IOperatorPortExecutions; import org.jooq.Field; +import org.jooq.Record3; import org.jooq.Record4; import org.jooq.Row4; -import org.jooq.impl.TableRecordImpl; -import org.jooq.types.UInteger; +import org.jooq.impl.UpdatableRecordImpl; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class OperatorPortExecutionsRecord extends TableRecordImpl implements Record4, IOperatorPortExecutions { +public class OperatorPortExecutionsRecord extends UpdatableRecordImpl implements Record4, IOperatorPortExecutions { - private static final long serialVersionUID = 1555812432; + private static final long serialVersionUID = 1L; /** - * Setter for texera_db.operator_port_executions.workflow_execution_id. + * Setter for + * texera_db.operator_port_executions.workflow_execution_id. */ @Override - public void setWorkflowExecutionId(UInteger value) { + public void setWorkflowExecutionId(Integer value) { set(0, value); } /** - * Getter for texera_db.operator_port_executions.workflow_execution_id. + * Getter for + * texera_db.operator_port_executions.workflow_execution_id. */ @Override - public UInteger getWorkflowExecutionId() { - return (UInteger) get(0); + public Integer getWorkflowExecutionId() { + return (Integer) get(0); } /** @@ -86,22 +88,31 @@ public String getResultUri() { return (String) get(3); } + // ------------------------------------------------------------------------- + // Primary key information + // ------------------------------------------------------------------------- + + @Override + public Record3 key() { + return (Record3) super.key(); + } + // ------------------------------------------------------------------------- // Record4 type implementation // ------------------------------------------------------------------------- @Override - public Row4 fieldsRow() { + public Row4 fieldsRow() { return (Row4) super.fieldsRow(); } @Override - public Row4 valuesRow() { + public Row4 valuesRow() { return (Row4) super.valuesRow(); } @Override - public Field field1() { + public Field field1() { return OperatorPortExecutions.OPERATOR_PORT_EXECUTIONS.WORKFLOW_EXECUTION_ID; } @@ -121,7 +132,7 @@ public Field field4() { } @Override - public UInteger component1() { + public Integer component1() { return getWorkflowExecutionId(); } @@ -141,7 +152,7 @@ public String component4() { } @Override - public UInteger value1() { + public Integer value1() { return getWorkflowExecutionId(); } @@ -161,7 +172,7 @@ public String value4() { } @Override - public OperatorPortExecutionsRecord value1(UInteger value) { + public OperatorPortExecutionsRecord value1(Integer value) { setWorkflowExecutionId(value); return this; } @@ -185,7 +196,7 @@ public OperatorPortExecutionsRecord value4(String value) { } @Override - public OperatorPortExecutionsRecord values(UInteger value1, String value2, Integer value3, String value4) { + public OperatorPortExecutionsRecord values(Integer value1, String value2, Integer value3, String value4) { value1(value1); value2(value2); value3(value3); @@ -225,12 +236,26 @@ public OperatorPortExecutionsRecord() { /** * Create a detached, initialised OperatorPortExecutionsRecord */ - public OperatorPortExecutionsRecord(UInteger workflowExecutionId, String operatorId, Integer portId, String resultUri) { + public OperatorPortExecutionsRecord(Integer workflowExecutionId, String operatorId, Integer portId, String resultUri) { + super(OperatorPortExecutions.OPERATOR_PORT_EXECUTIONS); + + setWorkflowExecutionId(workflowExecutionId); + setOperatorId(operatorId); + setPortId(portId); + setResultUri(resultUri); + } + + /** + * Create a detached, initialised OperatorPortExecutionsRecord + */ + public OperatorPortExecutionsRecord(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.OperatorPortExecutions value) { super(OperatorPortExecutions.OPERATOR_PORT_EXECUTIONS); - set(0, workflowExecutionId); - set(1, operatorId); - set(2, portId); - set(3, resultUri); + if (value != null) { + setWorkflowExecutionId(value.getWorkflowExecutionId()); + setOperatorId(value.getOperatorId()); + setPortId(value.getPortId()); + setResultUri(value.getResultUri()); + } } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/ProjectRecord.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/ProjectRecord.java index 530e1bf5353..f042286bca4 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/ProjectRecord.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/ProjectRecord.java @@ -14,22 +14,21 @@ import org.jooq.Record6; import org.jooq.Row6; import org.jooq.impl.UpdatableRecordImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class ProjectRecord extends UpdatableRecordImpl implements Record6, IProject { +public class ProjectRecord extends UpdatableRecordImpl implements Record6, IProject { - private static final long serialVersionUID = -392206862; + private static final long serialVersionUID = 1L; /** * Setter for texera_db.project.pid. */ @Override - public void setPid(UInteger value) { + public void setPid(Integer value) { set(0, value); } @@ -37,8 +36,8 @@ public void setPid(UInteger value) { * Getter for texera_db.project.pid. */ @Override - public UInteger getPid() { - return (UInteger) get(0); + public Integer getPid() { + return (Integer) get(0); } /** @@ -77,7 +76,7 @@ public String getDescription() { * Setter for texera_db.project.owner_id. */ @Override - public void setOwnerId(UInteger value) { + public void setOwnerId(Integer value) { set(3, value); } @@ -85,8 +84,8 @@ public void setOwnerId(UInteger value) { * Getter for texera_db.project.owner_id. */ @Override - public UInteger getOwnerId() { - return (UInteger) get(3); + public Integer getOwnerId() { + return (Integer) get(3); } /** @@ -126,7 +125,7 @@ public String getColor() { // ------------------------------------------------------------------------- @Override - public Record1 key() { + public Record1 key() { return (Record1) super.key(); } @@ -135,17 +134,17 @@ public Record1 key() { // ------------------------------------------------------------------------- @Override - public Row6 fieldsRow() { + public Row6 fieldsRow() { return (Row6) super.fieldsRow(); } @Override - public Row6 valuesRow() { + public Row6 valuesRow() { return (Row6) super.valuesRow(); } @Override - public Field field1() { + public Field field1() { return Project.PROJECT.PID; } @@ -160,7 +159,7 @@ public Field field3() { } @Override - public Field field4() { + public Field field4() { return Project.PROJECT.OWNER_ID; } @@ -175,7 +174,7 @@ public Field field6() { } @Override - public UInteger component1() { + public Integer component1() { return getPid(); } @@ -190,7 +189,7 @@ public String component3() { } @Override - public UInteger component4() { + public Integer component4() { return getOwnerId(); } @@ -205,7 +204,7 @@ public String component6() { } @Override - public UInteger value1() { + public Integer value1() { return getPid(); } @@ -220,7 +219,7 @@ public String value3() { } @Override - public UInteger value4() { + public Integer value4() { return getOwnerId(); } @@ -235,7 +234,7 @@ public String value6() { } @Override - public ProjectRecord value1(UInteger value) { + public ProjectRecord value1(Integer value) { setPid(value); return this; } @@ -253,7 +252,7 @@ public ProjectRecord value3(String value) { } @Override - public ProjectRecord value4(UInteger value) { + public ProjectRecord value4(Integer value) { setOwnerId(value); return this; } @@ -271,7 +270,7 @@ public ProjectRecord value6(String value) { } @Override - public ProjectRecord values(UInteger value1, String value2, String value3, UInteger value4, Timestamp value5, String value6) { + public ProjectRecord values(Integer value1, String value2, String value3, Integer value4, Timestamp value5, String value6) { value1(value1); value2(value2); value3(value3); @@ -315,14 +314,30 @@ public ProjectRecord() { /** * Create a detached, initialised ProjectRecord */ - public ProjectRecord(UInteger pid, String name, String description, UInteger ownerId, Timestamp creationTime, String color) { + public ProjectRecord(Integer pid, String name, String description, Integer ownerId, Timestamp creationTime, String color) { super(Project.PROJECT); - set(0, pid); - set(1, name); - set(2, description); - set(3, ownerId); - set(4, creationTime); - set(5, color); + setPid(pid); + setName(name); + setDescription(description); + setOwnerId(ownerId); + setCreationTime(creationTime); + setColor(color); + } + + /** + * Create a detached, initialised ProjectRecord + */ + public ProjectRecord(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.Project value) { + super(Project.PROJECT); + + if (value != null) { + setPid(value.getPid()); + setName(value.getName()); + setDescription(value.getDescription()); + setOwnerId(value.getOwnerId()); + setCreationTime(value.getCreationTime()); + setColor(value.getColor()); + } } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/ProjectUserAccessRecord.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/ProjectUserAccessRecord.java index 24dae3acac6..d3d6c564a66 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/ProjectUserAccessRecord.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/ProjectUserAccessRecord.java @@ -4,7 +4,7 @@ package edu.uci.ics.texera.dao.jooq.generated.tables.records; -import edu.uci.ics.texera.dao.jooq.generated.enums.ProjectUserAccessPrivilege; +import edu.uci.ics.texera.dao.jooq.generated.enums.PrivilegeEnum; import edu.uci.ics.texera.dao.jooq.generated.tables.ProjectUserAccess; import edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IProjectUserAccess; @@ -13,22 +13,21 @@ import org.jooq.Record3; import org.jooq.Row3; import org.jooq.impl.UpdatableRecordImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class ProjectUserAccessRecord extends UpdatableRecordImpl implements Record3, IProjectUserAccess { +public class ProjectUserAccessRecord extends UpdatableRecordImpl implements Record3, IProjectUserAccess { - private static final long serialVersionUID = 193545410; + private static final long serialVersionUID = 1L; /** * Setter for texera_db.project_user_access.uid. */ @Override - public void setUid(UInteger value) { + public void setUid(Integer value) { set(0, value); } @@ -36,15 +35,15 @@ public void setUid(UInteger value) { * Getter for texera_db.project_user_access.uid. */ @Override - public UInteger getUid() { - return (UInteger) get(0); + public Integer getUid() { + return (Integer) get(0); } /** * Setter for texera_db.project_user_access.pid. */ @Override - public void setPid(UInteger value) { + public void setPid(Integer value) { set(1, value); } @@ -52,15 +51,15 @@ public void setPid(UInteger value) { * Getter for texera_db.project_user_access.pid. */ @Override - public UInteger getPid() { - return (UInteger) get(1); + public Integer getPid() { + return (Integer) get(1); } /** * Setter for texera_db.project_user_access.privilege. */ @Override - public void setPrivilege(ProjectUserAccessPrivilege value) { + public void setPrivilege(PrivilegeEnum value) { set(2, value); } @@ -68,8 +67,8 @@ public void setPrivilege(ProjectUserAccessPrivilege value) { * Getter for texera_db.project_user_access.privilege. */ @Override - public ProjectUserAccessPrivilege getPrivilege() { - return (ProjectUserAccessPrivilege) get(2); + public PrivilegeEnum getPrivilege() { + return (PrivilegeEnum) get(2); } // ------------------------------------------------------------------------- @@ -77,7 +76,7 @@ public ProjectUserAccessPrivilege getPrivilege() { // ------------------------------------------------------------------------- @Override - public Record2 key() { + public Record2 key() { return (Record2) super.key(); } @@ -86,80 +85,80 @@ public Record2 key() { // ------------------------------------------------------------------------- @Override - public Row3 fieldsRow() { + public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } @Override - public Row3 valuesRow() { + public Row3 valuesRow() { return (Row3) super.valuesRow(); } @Override - public Field field1() { + public Field field1() { return ProjectUserAccess.PROJECT_USER_ACCESS.UID; } @Override - public Field field2() { + public Field field2() { return ProjectUserAccess.PROJECT_USER_ACCESS.PID; } @Override - public Field field3() { + public Field field3() { return ProjectUserAccess.PROJECT_USER_ACCESS.PRIVILEGE; } @Override - public UInteger component1() { + public Integer component1() { return getUid(); } @Override - public UInteger component2() { + public Integer component2() { return getPid(); } @Override - public ProjectUserAccessPrivilege component3() { + public PrivilegeEnum component3() { return getPrivilege(); } @Override - public UInteger value1() { + public Integer value1() { return getUid(); } @Override - public UInteger value2() { + public Integer value2() { return getPid(); } @Override - public ProjectUserAccessPrivilege value3() { + public PrivilegeEnum value3() { return getPrivilege(); } @Override - public ProjectUserAccessRecord value1(UInteger value) { + public ProjectUserAccessRecord value1(Integer value) { setUid(value); return this; } @Override - public ProjectUserAccessRecord value2(UInteger value) { + public ProjectUserAccessRecord value2(Integer value) { setPid(value); return this; } @Override - public ProjectUserAccessRecord value3(ProjectUserAccessPrivilege value) { + public ProjectUserAccessRecord value3(PrivilegeEnum value) { setPrivilege(value); return this; } @Override - public ProjectUserAccessRecord values(UInteger value1, UInteger value2, ProjectUserAccessPrivilege value3) { + public ProjectUserAccessRecord values(Integer value1, Integer value2, PrivilegeEnum value3) { value1(value1); value2(value2); value3(value3); @@ -197,11 +196,24 @@ public ProjectUserAccessRecord() { /** * Create a detached, initialised ProjectUserAccessRecord */ - public ProjectUserAccessRecord(UInteger uid, UInteger pid, ProjectUserAccessPrivilege privilege) { + public ProjectUserAccessRecord(Integer uid, Integer pid, PrivilegeEnum privilege) { super(ProjectUserAccess.PROJECT_USER_ACCESS); - set(0, uid); - set(1, pid); - set(2, privilege); + setUid(uid); + setPid(pid); + setPrivilege(privilege); + } + + /** + * Create a detached, initialised ProjectUserAccessRecord + */ + public ProjectUserAccessRecord(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.ProjectUserAccess value) { + super(ProjectUserAccess.PROJECT_USER_ACCESS); + + if (value != null) { + setUid(value.getUid()); + setPid(value.getPid()); + setPrivilege(value.getPrivilege()); + } } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/PublicProjectRecord.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/PublicProjectRecord.java index bce262006ff..45bc4983cda 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/PublicProjectRecord.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/PublicProjectRecord.java @@ -12,22 +12,21 @@ import org.jooq.Record2; import org.jooq.Row2; import org.jooq.impl.UpdatableRecordImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class PublicProjectRecord extends UpdatableRecordImpl implements Record2, IPublicProject { +public class PublicProjectRecord extends UpdatableRecordImpl implements Record2, IPublicProject { - private static final long serialVersionUID = -1511514396; + private static final long serialVersionUID = 1L; /** * Setter for texera_db.public_project.pid. */ @Override - public void setPid(UInteger value) { + public void setPid(Integer value) { set(0, value); } @@ -35,15 +34,15 @@ public void setPid(UInteger value) { * Getter for texera_db.public_project.pid. */ @Override - public UInteger getPid() { - return (UInteger) get(0); + public Integer getPid() { + return (Integer) get(0); } /** * Setter for texera_db.public_project.uid. */ @Override - public void setUid(UInteger value) { + public void setUid(Integer value) { set(1, value); } @@ -51,8 +50,8 @@ public void setUid(UInteger value) { * Getter for texera_db.public_project.uid. */ @Override - public UInteger getUid() { - return (UInteger) get(1); + public Integer getUid() { + return (Integer) get(1); } // ------------------------------------------------------------------------- @@ -60,7 +59,7 @@ public UInteger getUid() { // ------------------------------------------------------------------------- @Override - public Record1 key() { + public Record1 key() { return (Record1) super.key(); } @@ -69,59 +68,59 @@ public Record1 key() { // ------------------------------------------------------------------------- @Override - public Row2 fieldsRow() { + public Row2 fieldsRow() { return (Row2) super.fieldsRow(); } @Override - public Row2 valuesRow() { + public Row2 valuesRow() { return (Row2) super.valuesRow(); } @Override - public Field field1() { + public Field field1() { return PublicProject.PUBLIC_PROJECT.PID; } @Override - public Field field2() { + public Field field2() { return PublicProject.PUBLIC_PROJECT.UID; } @Override - public UInteger component1() { + public Integer component1() { return getPid(); } @Override - public UInteger component2() { + public Integer component2() { return getUid(); } @Override - public UInteger value1() { + public Integer value1() { return getPid(); } @Override - public UInteger value2() { + public Integer value2() { return getUid(); } @Override - public PublicProjectRecord value1(UInteger value) { + public PublicProjectRecord value1(Integer value) { setPid(value); return this; } @Override - public PublicProjectRecord value2(UInteger value) { + public PublicProjectRecord value2(Integer value) { setUid(value); return this; } @Override - public PublicProjectRecord values(UInteger value1, UInteger value2) { + public PublicProjectRecord values(Integer value1, Integer value2) { value1(value1); value2(value2); return this; @@ -157,10 +156,22 @@ public PublicProjectRecord() { /** * Create a detached, initialised PublicProjectRecord */ - public PublicProjectRecord(UInteger pid, UInteger uid) { + public PublicProjectRecord(Integer pid, Integer uid) { super(PublicProject.PUBLIC_PROJECT); - set(0, pid); - set(1, uid); + setPid(pid); + setUid(uid); + } + + /** + * Create a detached, initialised PublicProjectRecord + */ + public PublicProjectRecord(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.PublicProject value) { + super(PublicProject.PUBLIC_PROJECT); + + if (value != null) { + setPid(value.getPid()); + setUid(value.getUid()); + } } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/UserActivityRecord.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/UserActivityRecord.java index ba463dfcae5..72b72f7f90d 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/UserActivityRecord.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/UserActivityRecord.java @@ -13,22 +13,21 @@ import org.jooq.Record6; import org.jooq.Row6; import org.jooq.impl.TableRecordImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class UserActivityRecord extends TableRecordImpl implements Record6, IUserActivity { +public class UserActivityRecord extends TableRecordImpl implements Record6, IUserActivity { - private static final long serialVersionUID = -692407398; + private static final long serialVersionUID = 1L; /** * Setter for texera_db.user_activity.uid. */ @Override - public void setUid(UInteger value) { + public void setUid(Integer value) { set(0, value); } @@ -36,15 +35,15 @@ public void setUid(UInteger value) { * Getter for texera_db.user_activity.uid. */ @Override - public UInteger getUid() { - return (UInteger) get(0); + public Integer getUid() { + return (Integer) get(0); } /** * Setter for texera_db.user_activity.id. */ @Override - public void setId(UInteger value) { + public void setId(Integer value) { set(1, value); } @@ -52,8 +51,8 @@ public void setId(UInteger value) { * Getter for texera_db.user_activity.id. */ @Override - public UInteger getId() { - return (UInteger) get(1); + public Integer getId() { + return (Integer) get(1); } /** @@ -125,22 +124,22 @@ public Timestamp getActivityTime() { // ------------------------------------------------------------------------- @Override - public Row6 fieldsRow() { + public Row6 fieldsRow() { return (Row6) super.fieldsRow(); } @Override - public Row6 valuesRow() { + public Row6 valuesRow() { return (Row6) super.valuesRow(); } @Override - public Field field1() { + public Field field1() { return UserActivity.USER_ACTIVITY.UID; } @Override - public Field field2() { + public Field field2() { return UserActivity.USER_ACTIVITY.ID; } @@ -165,12 +164,12 @@ public Field field6() { } @Override - public UInteger component1() { + public Integer component1() { return getUid(); } @Override - public UInteger component2() { + public Integer component2() { return getId(); } @@ -195,12 +194,12 @@ public Timestamp component6() { } @Override - public UInteger value1() { + public Integer value1() { return getUid(); } @Override - public UInteger value2() { + public Integer value2() { return getId(); } @@ -225,13 +224,13 @@ public Timestamp value6() { } @Override - public UserActivityRecord value1(UInteger value) { + public UserActivityRecord value1(Integer value) { setUid(value); return this; } @Override - public UserActivityRecord value2(UInteger value) { + public UserActivityRecord value2(Integer value) { setId(value); return this; } @@ -261,7 +260,7 @@ public UserActivityRecord value6(Timestamp value) { } @Override - public UserActivityRecord values(UInteger value1, UInteger value2, String value3, String value4, String value5, Timestamp value6) { + public UserActivityRecord values(Integer value1, Integer value2, String value3, String value4, String value5, Timestamp value6) { value1(value1); value2(value2); value3(value3); @@ -305,14 +304,30 @@ public UserActivityRecord() { /** * Create a detached, initialised UserActivityRecord */ - public UserActivityRecord(UInteger uid, UInteger id, String type, String ip, String activate, Timestamp activityTime) { + public UserActivityRecord(Integer uid, Integer id, String type, String ip, String activate, Timestamp activityTime) { super(UserActivity.USER_ACTIVITY); - set(0, uid); - set(1, id); - set(2, type); - set(3, ip); - set(4, activate); - set(5, activityTime); + setUid(uid); + setId(id); + setType(type); + setIp(ip); + setActivate(activate); + setActivityTime(activityTime); + } + + /** + * Create a detached, initialised UserActivityRecord + */ + public UserActivityRecord(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.UserActivity value) { + super(UserActivity.USER_ACTIVITY); + + if (value != null) { + setUid(value.getUid()); + setId(value.getId()); + setType(value.getType()); + setIp(value.getIp()); + setActivate(value.getActivate()); + setActivityTime(value.getActivityTime()); + } } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/UserConfigRecord.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/UserConfigRecord.java index 34568341b55..159bf764c16 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/UserConfigRecord.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/UserConfigRecord.java @@ -12,22 +12,21 @@ import org.jooq.Record3; import org.jooq.Row3; import org.jooq.impl.UpdatableRecordImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class UserConfigRecord extends UpdatableRecordImpl implements Record3, IUserConfig { +public class UserConfigRecord extends UpdatableRecordImpl implements Record3, IUserConfig { - private static final long serialVersionUID = -714870732; + private static final long serialVersionUID = 1L; /** * Setter for texera_db.user_config.uid. */ @Override - public void setUid(UInteger value) { + public void setUid(Integer value) { set(0, value); } @@ -35,8 +34,8 @@ public void setUid(UInteger value) { * Getter for texera_db.user_config.uid. */ @Override - public UInteger getUid() { - return (UInteger) get(0); + public Integer getUid() { + return (Integer) get(0); } /** @@ -76,7 +75,7 @@ public String getValue() { // ------------------------------------------------------------------------- @Override - public Record2 key() { + public Record2 key() { return (Record2) super.key(); } @@ -85,17 +84,17 @@ public Record2 key() { // ------------------------------------------------------------------------- @Override - public Row3 fieldsRow() { + public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } @Override - public Row3 valuesRow() { + public Row3 valuesRow() { return (Row3) super.valuesRow(); } @Override - public Field field1() { + public Field field1() { return UserConfig.USER_CONFIG.UID; } @@ -110,7 +109,7 @@ public Field field3() { } @Override - public UInteger component1() { + public Integer component1() { return getUid(); } @@ -125,7 +124,7 @@ public String component3() { } @Override - public UInteger value1() { + public Integer value1() { return getUid(); } @@ -140,7 +139,7 @@ public String value3() { } @Override - public UserConfigRecord value1(UInteger value) { + public UserConfigRecord value1(Integer value) { setUid(value); return this; } @@ -158,7 +157,7 @@ public UserConfigRecord value3(String value) { } @Override - public UserConfigRecord values(UInteger value1, String value2, String value3) { + public UserConfigRecord values(Integer value1, String value2, String value3) { value1(value1); value2(value2); value3(value3); @@ -196,11 +195,24 @@ public UserConfigRecord() { /** * Create a detached, initialised UserConfigRecord */ - public UserConfigRecord(UInteger uid, String key, String value) { + public UserConfigRecord(Integer uid, String key, String value) { super(UserConfig.USER_CONFIG); - set(0, uid); - set(1, key); - set(2, value); + setUid(uid); + setKey(key); + setValue(value); + } + + /** + * Create a detached, initialised UserConfigRecord + */ + public UserConfigRecord(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.UserConfig value) { + super(UserConfig.USER_CONFIG); + + if (value != null) { + setUid(value.getUid()); + setKey(value.getKey()); + setValue(value.getValue()); + } } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/UserRecord.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/UserRecord.java index 7194e4a0093..e2b65d74289 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/UserRecord.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/UserRecord.java @@ -4,7 +4,7 @@ package edu.uci.ics.texera.dao.jooq.generated.tables.records; -import edu.uci.ics.texera.dao.jooq.generated.enums.UserRole; +import edu.uci.ics.texera.dao.jooq.generated.enums.UserRoleEnum; import edu.uci.ics.texera.dao.jooq.generated.tables.User; import edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IUser; @@ -13,22 +13,21 @@ import org.jooq.Record7; import org.jooq.Row7; import org.jooq.impl.UpdatableRecordImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class UserRecord extends UpdatableRecordImpl implements Record7, IUser { +public class UserRecord extends UpdatableRecordImpl implements Record7, IUser { - private static final long serialVersionUID = 1681966497; + private static final long serialVersionUID = 1L; /** * Setter for texera_db.user.uid. */ @Override - public void setUid(UInteger value) { + public void setUid(Integer value) { set(0, value); } @@ -36,8 +35,8 @@ public void setUid(UInteger value) { * Getter for texera_db.user.uid. */ @Override - public UInteger getUid() { - return (UInteger) get(0); + public Integer getUid() { + return (Integer) get(0); } /** @@ -105,35 +104,35 @@ public String getGoogleId() { } /** - * Setter for texera_db.user.role. + * Setter for texera_db.user.google_avatar. */ @Override - public void setRole(UserRole value) { + public void setGoogleAvatar(String value) { set(5, value); } /** - * Getter for texera_db.user.role. + * Getter for texera_db.user.google_avatar. */ @Override - public UserRole getRole() { - return (UserRole) get(5); + public String getGoogleAvatar() { + return (String) get(5); } /** - * Setter for texera_db.user.google_avatar. + * Setter for texera_db.user.role. */ @Override - public void setGoogleAvatar(String value) { + public void setRole(UserRoleEnum value) { set(6, value); } /** - * Getter for texera_db.user.google_avatar. + * Getter for texera_db.user.role. */ @Override - public String getGoogleAvatar() { - return (String) get(6); + public UserRoleEnum getRole() { + return (UserRoleEnum) get(6); } // ------------------------------------------------------------------------- @@ -141,7 +140,7 @@ public String getGoogleAvatar() { // ------------------------------------------------------------------------- @Override - public Record1 key() { + public Record1 key() { return (Record1) super.key(); } @@ -150,17 +149,17 @@ public Record1 key() { // ------------------------------------------------------------------------- @Override - public Row7 fieldsRow() { + public Row7 fieldsRow() { return (Row7) super.fieldsRow(); } @Override - public Row7 valuesRow() { + public Row7 valuesRow() { return (Row7) super.valuesRow(); } @Override - public Field field1() { + public Field field1() { return User.USER.UID; } @@ -185,17 +184,17 @@ public Field field5() { } @Override - public Field field6() { - return User.USER.ROLE; + public Field field6() { + return User.USER.GOOGLE_AVATAR; } @Override - public Field field7() { - return User.USER.GOOGLE_AVATAR; + public Field field7() { + return User.USER.ROLE; } @Override - public UInteger component1() { + public Integer component1() { return getUid(); } @@ -220,17 +219,17 @@ public String component5() { } @Override - public UserRole component6() { - return getRole(); + public String component6() { + return getGoogleAvatar(); } @Override - public String component7() { - return getGoogleAvatar(); + public UserRoleEnum component7() { + return getRole(); } @Override - public UInteger value1() { + public Integer value1() { return getUid(); } @@ -255,17 +254,17 @@ public String value5() { } @Override - public UserRole value6() { - return getRole(); + public String value6() { + return getGoogleAvatar(); } @Override - public String value7() { - return getGoogleAvatar(); + public UserRoleEnum value7() { + return getRole(); } @Override - public UserRecord value1(UInteger value) { + public UserRecord value1(Integer value) { setUid(value); return this; } @@ -295,19 +294,19 @@ public UserRecord value5(String value) { } @Override - public UserRecord value6(UserRole value) { - setRole(value); + public UserRecord value6(String value) { + setGoogleAvatar(value); return this; } @Override - public UserRecord value7(String value) { - setGoogleAvatar(value); + public UserRecord value7(UserRoleEnum value) { + setRole(value); return this; } @Override - public UserRecord values(UInteger value1, String value2, String value3, String value4, String value5, UserRole value6, String value7) { + public UserRecord values(Integer value1, String value2, String value3, String value4, String value5, String value6, UserRoleEnum value7) { value1(value1); value2(value2); value3(value3); @@ -329,8 +328,8 @@ public void from(IUser from) { setEmail(from.getEmail()); setPassword(from.getPassword()); setGoogleId(from.getGoogleId()); - setRole(from.getRole()); setGoogleAvatar(from.getGoogleAvatar()); + setRole(from.getRole()); } @Override @@ -353,15 +352,32 @@ public UserRecord() { /** * Create a detached, initialised UserRecord */ - public UserRecord(UInteger uid, String name, String email, String password, String googleId, UserRole role, String googleAvatar) { + public UserRecord(Integer uid, String name, String email, String password, String googleId, String googleAvatar, UserRoleEnum role) { + super(User.USER); + + setUid(uid); + setName(name); + setEmail(email); + setPassword(password); + setGoogleId(googleId); + setGoogleAvatar(googleAvatar); + setRole(role); + } + + /** + * Create a detached, initialised UserRecord + */ + public UserRecord(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.User value) { super(User.USER); - set(0, uid); - set(1, name); - set(2, email); - set(3, password); - set(4, googleId); - set(5, role); - set(6, googleAvatar); + if (value != null) { + setUid(value.getUid()); + setName(value.getName()); + setEmail(value.getEmail()); + setPassword(value.getPassword()); + setGoogleId(value.getGoogleId()); + setGoogleAvatar(value.getGoogleAvatar()); + setRole(value.getRole()); + } } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowExecutionsRecord.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowExecutionsRecord.java index 17c967b2726..3b7926c131d 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowExecutionsRecord.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowExecutionsRecord.java @@ -14,22 +14,21 @@ import org.jooq.Record12; import org.jooq.Row12; import org.jooq.impl.UpdatableRecordImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class WorkflowExecutionsRecord extends UpdatableRecordImpl implements Record12, IWorkflowExecutions { +public class WorkflowExecutionsRecord extends UpdatableRecordImpl implements Record12, IWorkflowExecutions { - private static final long serialVersionUID = -986922842; + private static final long serialVersionUID = 1L; /** * Setter for texera_db.workflow_executions.eid. */ @Override - public void setEid(UInteger value) { + public void setEid(Integer value) { set(0, value); } @@ -37,15 +36,15 @@ public void setEid(UInteger value) { * Getter for texera_db.workflow_executions.eid. */ @Override - public UInteger getEid() { - return (UInteger) get(0); + public Integer getEid() { + return (Integer) get(0); } /** * Setter for texera_db.workflow_executions.vid. */ @Override - public void setVid(UInteger value) { + public void setVid(Integer value) { set(1, value); } @@ -53,15 +52,15 @@ public void setVid(UInteger value) { * Getter for texera_db.workflow_executions.vid. */ @Override - public UInteger getVid() { - return (UInteger) get(1); + public Integer getVid() { + return (Integer) get(1); } /** * Setter for texera_db.workflow_executions.uid. */ @Override - public void setUid(UInteger value) { + public void setUid(Integer value) { set(2, value); } @@ -69,15 +68,15 @@ public void setUid(UInteger value) { * Getter for texera_db.workflow_executions.uid. */ @Override - public UInteger getUid() { - return (UInteger) get(2); + public Integer getUid() { + return (Integer) get(2); } /** * Setter for texera_db.workflow_executions.status. */ @Override - public void setStatus(Byte value) { + public void setStatus(Short value) { set(3, value); } @@ -85,8 +84,8 @@ public void setStatus(Byte value) { * Getter for texera_db.workflow_executions.status. */ @Override - public Byte getStatus() { - return (Byte) get(3); + public Short getStatus() { + return (Short) get(3); } /** @@ -141,7 +140,7 @@ public Timestamp getLastUpdateTime() { * Setter for texera_db.workflow_executions.bookmarked. */ @Override - public void setBookmarked(Byte value) { + public void setBookmarked(Boolean value) { set(7, value); } @@ -149,8 +148,8 @@ public void setBookmarked(Byte value) { * Getter for texera_db.workflow_executions.bookmarked. */ @Override - public Byte getBookmarked() { - return (Byte) get(7); + public Boolean getBookmarked() { + return (Boolean) get(7); } /** @@ -170,7 +169,8 @@ public String getName() { } /** - * Setter for texera_db.workflow_executions.environment_version. + * Setter for + * texera_db.workflow_executions.environment_version. */ @Override public void setEnvironmentVersion(String value) { @@ -178,7 +178,8 @@ public void setEnvironmentVersion(String value) { } /** - * Getter for texera_db.workflow_executions.environment_version. + * Getter for + * texera_db.workflow_executions.environment_version. */ @Override public String getEnvironmentVersion() { @@ -222,7 +223,7 @@ public String getRuntimeStatsUri() { // ------------------------------------------------------------------------- @Override - public Record1 key() { + public Record1 key() { return (Record1) super.key(); } @@ -231,32 +232,32 @@ public Record1 key() { // ------------------------------------------------------------------------- @Override - public Row12 fieldsRow() { + public Row12 fieldsRow() { return (Row12) super.fieldsRow(); } @Override - public Row12 valuesRow() { + public Row12 valuesRow() { return (Row12) super.valuesRow(); } @Override - public Field field1() { + public Field field1() { return WorkflowExecutions.WORKFLOW_EXECUTIONS.EID; } @Override - public Field field2() { + public Field field2() { return WorkflowExecutions.WORKFLOW_EXECUTIONS.VID; } @Override - public Field field3() { + public Field field3() { return WorkflowExecutions.WORKFLOW_EXECUTIONS.UID; } @Override - public Field field4() { + public Field field4() { return WorkflowExecutions.WORKFLOW_EXECUTIONS.STATUS; } @@ -276,7 +277,7 @@ public Field field7() { } @Override - public Field field8() { + public Field field8() { return WorkflowExecutions.WORKFLOW_EXECUTIONS.BOOKMARKED; } @@ -301,22 +302,22 @@ public Field field12() { } @Override - public UInteger component1() { + public Integer component1() { return getEid(); } @Override - public UInteger component2() { + public Integer component2() { return getVid(); } @Override - public UInteger component3() { + public Integer component3() { return getUid(); } @Override - public Byte component4() { + public Short component4() { return getStatus(); } @@ -336,7 +337,7 @@ public Timestamp component7() { } @Override - public Byte component8() { + public Boolean component8() { return getBookmarked(); } @@ -361,22 +362,22 @@ public String component12() { } @Override - public UInteger value1() { + public Integer value1() { return getEid(); } @Override - public UInteger value2() { + public Integer value2() { return getVid(); } @Override - public UInteger value3() { + public Integer value3() { return getUid(); } @Override - public Byte value4() { + public Short value4() { return getStatus(); } @@ -396,7 +397,7 @@ public Timestamp value7() { } @Override - public Byte value8() { + public Boolean value8() { return getBookmarked(); } @@ -421,25 +422,25 @@ public String value12() { } @Override - public WorkflowExecutionsRecord value1(UInteger value) { + public WorkflowExecutionsRecord value1(Integer value) { setEid(value); return this; } @Override - public WorkflowExecutionsRecord value2(UInteger value) { + public WorkflowExecutionsRecord value2(Integer value) { setVid(value); return this; } @Override - public WorkflowExecutionsRecord value3(UInteger value) { + public WorkflowExecutionsRecord value3(Integer value) { setUid(value); return this; } @Override - public WorkflowExecutionsRecord value4(Byte value) { + public WorkflowExecutionsRecord value4(Short value) { setStatus(value); return this; } @@ -463,7 +464,7 @@ public WorkflowExecutionsRecord value7(Timestamp value) { } @Override - public WorkflowExecutionsRecord value8(Byte value) { + public WorkflowExecutionsRecord value8(Boolean value) { setBookmarked(value); return this; } @@ -493,7 +494,7 @@ public WorkflowExecutionsRecord value12(String value) { } @Override - public WorkflowExecutionsRecord values(UInteger value1, UInteger value2, UInteger value3, Byte value4, String value5, Timestamp value6, Timestamp value7, Byte value8, String value9, String value10, String value11, String value12) { + public WorkflowExecutionsRecord values(Integer value1, Integer value2, Integer value3, Short value4, String value5, Timestamp value6, Timestamp value7, Boolean value8, String value9, String value10, String value11, String value12) { value1(value1); value2(value2); value3(value3); @@ -549,20 +550,42 @@ public WorkflowExecutionsRecord() { /** * Create a detached, initialised WorkflowExecutionsRecord */ - public WorkflowExecutionsRecord(UInteger eid, UInteger vid, UInteger uid, Byte status, String result, Timestamp startingTime, Timestamp lastUpdateTime, Byte bookmarked, String name, String environmentVersion, String logLocation, String runtimeStatsUri) { + public WorkflowExecutionsRecord(Integer eid, Integer vid, Integer uid, Short status, String result, Timestamp startingTime, Timestamp lastUpdateTime, Boolean bookmarked, String name, String environmentVersion, String logLocation, String runtimeStatsUri) { super(WorkflowExecutions.WORKFLOW_EXECUTIONS); - set(0, eid); - set(1, vid); - set(2, uid); - set(3, status); - set(4, result); - set(5, startingTime); - set(6, lastUpdateTime); - set(7, bookmarked); - set(8, name); - set(9, environmentVersion); - set(10, logLocation); - set(11, runtimeStatsUri); + setEid(eid); + setVid(vid); + setUid(uid); + setStatus(status); + setResult(result); + setStartingTime(startingTime); + setLastUpdateTime(lastUpdateTime); + setBookmarked(bookmarked); + setName(name); + setEnvironmentVersion(environmentVersion); + setLogLocation(logLocation); + setRuntimeStatsUri(runtimeStatsUri); + } + + /** + * Create a detached, initialised WorkflowExecutionsRecord + */ + public WorkflowExecutionsRecord(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowExecutions value) { + super(WorkflowExecutions.WORKFLOW_EXECUTIONS); + + if (value != null) { + setEid(value.getEid()); + setVid(value.getVid()); + setUid(value.getUid()); + setStatus(value.getStatus()); + setResult(value.getResult()); + setStartingTime(value.getStartingTime()); + setLastUpdateTime(value.getLastUpdateTime()); + setBookmarked(value.getBookmarked()); + setName(value.getName()); + setEnvironmentVersion(value.getEnvironmentVersion()); + setLogLocation(value.getLogLocation()); + setRuntimeStatsUri(value.getRuntimeStatsUri()); + } } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowOfProjectRecord.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowOfProjectRecord.java index 604ac581b25..9584f2213ca 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowOfProjectRecord.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowOfProjectRecord.java @@ -11,22 +11,21 @@ import org.jooq.Record2; import org.jooq.Row2; import org.jooq.impl.UpdatableRecordImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class WorkflowOfProjectRecord extends UpdatableRecordImpl implements Record2, IWorkflowOfProject { +public class WorkflowOfProjectRecord extends UpdatableRecordImpl implements Record2, IWorkflowOfProject { - private static final long serialVersionUID = -812098964; + private static final long serialVersionUID = 1L; /** * Setter for texera_db.workflow_of_project.wid. */ @Override - public void setWid(UInteger value) { + public void setWid(Integer value) { set(0, value); } @@ -34,15 +33,15 @@ public void setWid(UInteger value) { * Getter for texera_db.workflow_of_project.wid. */ @Override - public UInteger getWid() { - return (UInteger) get(0); + public Integer getWid() { + return (Integer) get(0); } /** * Setter for texera_db.workflow_of_project.pid. */ @Override - public void setPid(UInteger value) { + public void setPid(Integer value) { set(1, value); } @@ -50,8 +49,8 @@ public void setPid(UInteger value) { * Getter for texera_db.workflow_of_project.pid. */ @Override - public UInteger getPid() { - return (UInteger) get(1); + public Integer getPid() { + return (Integer) get(1); } // ------------------------------------------------------------------------- @@ -59,7 +58,7 @@ public UInteger getPid() { // ------------------------------------------------------------------------- @Override - public Record2 key() { + public Record2 key() { return (Record2) super.key(); } @@ -68,59 +67,59 @@ public Record2 key() { // ------------------------------------------------------------------------- @Override - public Row2 fieldsRow() { + public Row2 fieldsRow() { return (Row2) super.fieldsRow(); } @Override - public Row2 valuesRow() { + public Row2 valuesRow() { return (Row2) super.valuesRow(); } @Override - public Field field1() { + public Field field1() { return WorkflowOfProject.WORKFLOW_OF_PROJECT.WID; } @Override - public Field field2() { + public Field field2() { return WorkflowOfProject.WORKFLOW_OF_PROJECT.PID; } @Override - public UInteger component1() { + public Integer component1() { return getWid(); } @Override - public UInteger component2() { + public Integer component2() { return getPid(); } @Override - public UInteger value1() { + public Integer value1() { return getWid(); } @Override - public UInteger value2() { + public Integer value2() { return getPid(); } @Override - public WorkflowOfProjectRecord value1(UInteger value) { + public WorkflowOfProjectRecord value1(Integer value) { setWid(value); return this; } @Override - public WorkflowOfProjectRecord value2(UInteger value) { + public WorkflowOfProjectRecord value2(Integer value) { setPid(value); return this; } @Override - public WorkflowOfProjectRecord values(UInteger value1, UInteger value2) { + public WorkflowOfProjectRecord values(Integer value1, Integer value2) { value1(value1); value2(value2); return this; @@ -156,10 +155,22 @@ public WorkflowOfProjectRecord() { /** * Create a detached, initialised WorkflowOfProjectRecord */ - public WorkflowOfProjectRecord(UInteger wid, UInteger pid) { + public WorkflowOfProjectRecord(Integer wid, Integer pid) { super(WorkflowOfProject.WORKFLOW_OF_PROJECT); - set(0, wid); - set(1, pid); + setWid(wid); + setPid(pid); + } + + /** + * Create a detached, initialised WorkflowOfProjectRecord + */ + public WorkflowOfProjectRecord(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowOfProject value) { + super(WorkflowOfProject.WORKFLOW_OF_PROJECT); + + if (value != null) { + setWid(value.getWid()); + setPid(value.getPid()); + } } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowOfUserRecord.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowOfUserRecord.java index 190bae13913..2e3ed734ef9 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowOfUserRecord.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowOfUserRecord.java @@ -11,22 +11,21 @@ import org.jooq.Record2; import org.jooq.Row2; import org.jooq.impl.UpdatableRecordImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class WorkflowOfUserRecord extends UpdatableRecordImpl implements Record2, IWorkflowOfUser { +public class WorkflowOfUserRecord extends UpdatableRecordImpl implements Record2, IWorkflowOfUser { - private static final long serialVersionUID = -2089382054; + private static final long serialVersionUID = 1L; /** * Setter for texera_db.workflow_of_user.uid. */ @Override - public void setUid(UInteger value) { + public void setUid(Integer value) { set(0, value); } @@ -34,15 +33,15 @@ public void setUid(UInteger value) { * Getter for texera_db.workflow_of_user.uid. */ @Override - public UInteger getUid() { - return (UInteger) get(0); + public Integer getUid() { + return (Integer) get(0); } /** * Setter for texera_db.workflow_of_user.wid. */ @Override - public void setWid(UInteger value) { + public void setWid(Integer value) { set(1, value); } @@ -50,8 +49,8 @@ public void setWid(UInteger value) { * Getter for texera_db.workflow_of_user.wid. */ @Override - public UInteger getWid() { - return (UInteger) get(1); + public Integer getWid() { + return (Integer) get(1); } // ------------------------------------------------------------------------- @@ -59,7 +58,7 @@ public UInteger getWid() { // ------------------------------------------------------------------------- @Override - public Record2 key() { + public Record2 key() { return (Record2) super.key(); } @@ -68,59 +67,59 @@ public Record2 key() { // ------------------------------------------------------------------------- @Override - public Row2 fieldsRow() { + public Row2 fieldsRow() { return (Row2) super.fieldsRow(); } @Override - public Row2 valuesRow() { + public Row2 valuesRow() { return (Row2) super.valuesRow(); } @Override - public Field field1() { + public Field field1() { return WorkflowOfUser.WORKFLOW_OF_USER.UID; } @Override - public Field field2() { + public Field field2() { return WorkflowOfUser.WORKFLOW_OF_USER.WID; } @Override - public UInteger component1() { + public Integer component1() { return getUid(); } @Override - public UInteger component2() { + public Integer component2() { return getWid(); } @Override - public UInteger value1() { + public Integer value1() { return getUid(); } @Override - public UInteger value2() { + public Integer value2() { return getWid(); } @Override - public WorkflowOfUserRecord value1(UInteger value) { + public WorkflowOfUserRecord value1(Integer value) { setUid(value); return this; } @Override - public WorkflowOfUserRecord value2(UInteger value) { + public WorkflowOfUserRecord value2(Integer value) { setWid(value); return this; } @Override - public WorkflowOfUserRecord values(UInteger value1, UInteger value2) { + public WorkflowOfUserRecord values(Integer value1, Integer value2) { value1(value1); value2(value2); return this; @@ -156,10 +155,22 @@ public WorkflowOfUserRecord() { /** * Create a detached, initialised WorkflowOfUserRecord */ - public WorkflowOfUserRecord(UInteger uid, UInteger wid) { + public WorkflowOfUserRecord(Integer uid, Integer wid) { super(WorkflowOfUser.WORKFLOW_OF_USER); - set(0, uid); - set(1, wid); + setUid(uid); + setWid(wid); + } + + /** + * Create a detached, initialised WorkflowOfUserRecord + */ + public WorkflowOfUserRecord(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowOfUser value) { + super(WorkflowOfUser.WORKFLOW_OF_USER); + + if (value != null) { + setUid(value.getUid()); + setWid(value.getWid()); + } } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowRecord.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowRecord.java index 218dffacf65..d4a42cfe507 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowRecord.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowRecord.java @@ -14,63 +14,62 @@ import org.jooq.Record7; import org.jooq.Row7; import org.jooq.impl.UpdatableRecordImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class WorkflowRecord extends UpdatableRecordImpl implements Record7, IWorkflow { +public class WorkflowRecord extends UpdatableRecordImpl implements Record7, IWorkflow { - private static final long serialVersionUID = 1992208375; + private static final long serialVersionUID = 1L; /** - * Setter for texera_db.workflow.name. + * Setter for texera_db.workflow.wid. */ @Override - public void setName(String value) { + public void setWid(Integer value) { set(0, value); } /** - * Getter for texera_db.workflow.name. + * Getter for texera_db.workflow.wid. */ @Override - public String getName() { - return (String) get(0); + public Integer getWid() { + return (Integer) get(0); } /** - * Setter for texera_db.workflow.description. + * Setter for texera_db.workflow.name. */ @Override - public void setDescription(String value) { + public void setName(String value) { set(1, value); } /** - * Getter for texera_db.workflow.description. + * Getter for texera_db.workflow.name. */ @Override - public String getDescription() { + public String getName() { return (String) get(1); } /** - * Setter for texera_db.workflow.wid. + * Setter for texera_db.workflow.description. */ @Override - public void setWid(UInteger value) { + public void setDescription(String value) { set(2, value); } /** - * Getter for texera_db.workflow.wid. + * Getter for texera_db.workflow.description. */ @Override - public UInteger getWid() { - return (UInteger) get(2); + public String getDescription() { + return (String) get(2); } /** @@ -125,7 +124,7 @@ public Timestamp getLastModifiedTime() { * Setter for texera_db.workflow.is_public. */ @Override - public void setIsPublic(Byte value) { + public void setIsPublic(Boolean value) { set(6, value); } @@ -133,8 +132,8 @@ public void setIsPublic(Byte value) { * Getter for texera_db.workflow.is_public. */ @Override - public Byte getIsPublic() { - return (Byte) get(6); + public Boolean getIsPublic() { + return (Boolean) get(6); } // ------------------------------------------------------------------------- @@ -142,7 +141,7 @@ public Byte getIsPublic() { // ------------------------------------------------------------------------- @Override - public Record1 key() { + public Record1 key() { return (Record1) super.key(); } @@ -151,28 +150,28 @@ public Record1 key() { // ------------------------------------------------------------------------- @Override - public Row7 fieldsRow() { + public Row7 fieldsRow() { return (Row7) super.fieldsRow(); } @Override - public Row7 valuesRow() { + public Row7 valuesRow() { return (Row7) super.valuesRow(); } @Override - public Field field1() { - return Workflow.WORKFLOW.NAME; + public Field field1() { + return Workflow.WORKFLOW.WID; } @Override public Field field2() { - return Workflow.WORKFLOW.DESCRIPTION; + return Workflow.WORKFLOW.NAME; } @Override - public Field field3() { - return Workflow.WORKFLOW.WID; + public Field field3() { + return Workflow.WORKFLOW.DESCRIPTION; } @Override @@ -191,23 +190,23 @@ public Field field6() { } @Override - public Field field7() { + public Field field7() { return Workflow.WORKFLOW.IS_PUBLIC; } @Override - public String component1() { - return getName(); + public Integer component1() { + return getWid(); } @Override public String component2() { - return getDescription(); + return getName(); } @Override - public UInteger component3() { - return getWid(); + public String component3() { + return getDescription(); } @Override @@ -226,23 +225,23 @@ public Timestamp component6() { } @Override - public Byte component7() { + public Boolean component7() { return getIsPublic(); } @Override - public String value1() { - return getName(); + public Integer value1() { + return getWid(); } @Override public String value2() { - return getDescription(); + return getName(); } @Override - public UInteger value3() { - return getWid(); + public String value3() { + return getDescription(); } @Override @@ -261,25 +260,25 @@ public Timestamp value6() { } @Override - public Byte value7() { + public Boolean value7() { return getIsPublic(); } @Override - public WorkflowRecord value1(String value) { - setName(value); + public WorkflowRecord value1(Integer value) { + setWid(value); return this; } @Override public WorkflowRecord value2(String value) { - setDescription(value); + setName(value); return this; } @Override - public WorkflowRecord value3(UInteger value) { - setWid(value); + public WorkflowRecord value3(String value) { + setDescription(value); return this; } @@ -302,13 +301,13 @@ public WorkflowRecord value6(Timestamp value) { } @Override - public WorkflowRecord value7(Byte value) { + public WorkflowRecord value7(Boolean value) { setIsPublic(value); return this; } @Override - public WorkflowRecord values(String value1, String value2, UInteger value3, String value4, Timestamp value5, Timestamp value6, Byte value7) { + public WorkflowRecord values(Integer value1, String value2, String value3, String value4, Timestamp value5, Timestamp value6, Boolean value7) { value1(value1); value2(value2); value3(value3); @@ -325,9 +324,9 @@ public WorkflowRecord values(String value1, String value2, UInteger value3, Stri @Override public void from(IWorkflow from) { + setWid(from.getWid()); setName(from.getName()); setDescription(from.getDescription()); - setWid(from.getWid()); setContent(from.getContent()); setCreationTime(from.getCreationTime()); setLastModifiedTime(from.getLastModifiedTime()); @@ -354,15 +353,32 @@ public WorkflowRecord() { /** * Create a detached, initialised WorkflowRecord */ - public WorkflowRecord(String name, String description, UInteger wid, String content, Timestamp creationTime, Timestamp lastModifiedTime, Byte isPublic) { + public WorkflowRecord(Integer wid, String name, String description, String content, Timestamp creationTime, Timestamp lastModifiedTime, Boolean isPublic) { + super(Workflow.WORKFLOW); + + setWid(wid); + setName(name); + setDescription(description); + setContent(content); + setCreationTime(creationTime); + setLastModifiedTime(lastModifiedTime); + setIsPublic(isPublic); + } + + /** + * Create a detached, initialised WorkflowRecord + */ + public WorkflowRecord(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.Workflow value) { super(Workflow.WORKFLOW); - set(0, name); - set(1, description); - set(2, wid); - set(3, content); - set(4, creationTime); - set(5, lastModifiedTime); - set(6, isPublic); + if (value != null) { + setWid(value.getWid()); + setName(value.getName()); + setDescription(value.getDescription()); + setContent(value.getContent()); + setCreationTime(value.getCreationTime()); + setLastModifiedTime(value.getLastModifiedTime()); + setIsPublic(value.getIsPublic()); + } } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowUserAccessRecord.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowUserAccessRecord.java index 6ffff85e682..d03a85b6480 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowUserAccessRecord.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowUserAccessRecord.java @@ -4,7 +4,7 @@ package edu.uci.ics.texera.dao.jooq.generated.tables.records; -import edu.uci.ics.texera.dao.jooq.generated.enums.WorkflowUserAccessPrivilege; +import edu.uci.ics.texera.dao.jooq.generated.enums.PrivilegeEnum; import edu.uci.ics.texera.dao.jooq.generated.tables.WorkflowUserAccess; import edu.uci.ics.texera.dao.jooq.generated.tables.interfaces.IWorkflowUserAccess; @@ -13,22 +13,21 @@ import org.jooq.Record3; import org.jooq.Row3; import org.jooq.impl.UpdatableRecordImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class WorkflowUserAccessRecord extends UpdatableRecordImpl implements Record3, IWorkflowUserAccess { +public class WorkflowUserAccessRecord extends UpdatableRecordImpl implements Record3, IWorkflowUserAccess { - private static final long serialVersionUID = 2064079376; + private static final long serialVersionUID = 1L; /** * Setter for texera_db.workflow_user_access.uid. */ @Override - public void setUid(UInteger value) { + public void setUid(Integer value) { set(0, value); } @@ -36,15 +35,15 @@ public void setUid(UInteger value) { * Getter for texera_db.workflow_user_access.uid. */ @Override - public UInteger getUid() { - return (UInteger) get(0); + public Integer getUid() { + return (Integer) get(0); } /** * Setter for texera_db.workflow_user_access.wid. */ @Override - public void setWid(UInteger value) { + public void setWid(Integer value) { set(1, value); } @@ -52,15 +51,15 @@ public void setWid(UInteger value) { * Getter for texera_db.workflow_user_access.wid. */ @Override - public UInteger getWid() { - return (UInteger) get(1); + public Integer getWid() { + return (Integer) get(1); } /** * Setter for texera_db.workflow_user_access.privilege. */ @Override - public void setPrivilege(WorkflowUserAccessPrivilege value) { + public void setPrivilege(PrivilegeEnum value) { set(2, value); } @@ -68,8 +67,8 @@ public void setPrivilege(WorkflowUserAccessPrivilege value) { * Getter for texera_db.workflow_user_access.privilege. */ @Override - public WorkflowUserAccessPrivilege getPrivilege() { - return (WorkflowUserAccessPrivilege) get(2); + public PrivilegeEnum getPrivilege() { + return (PrivilegeEnum) get(2); } // ------------------------------------------------------------------------- @@ -77,7 +76,7 @@ public WorkflowUserAccessPrivilege getPrivilege() { // ------------------------------------------------------------------------- @Override - public Record2 key() { + public Record2 key() { return (Record2) super.key(); } @@ -86,80 +85,80 @@ public Record2 key() { // ------------------------------------------------------------------------- @Override - public Row3 fieldsRow() { + public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } @Override - public Row3 valuesRow() { + public Row3 valuesRow() { return (Row3) super.valuesRow(); } @Override - public Field field1() { + public Field field1() { return WorkflowUserAccess.WORKFLOW_USER_ACCESS.UID; } @Override - public Field field2() { + public Field field2() { return WorkflowUserAccess.WORKFLOW_USER_ACCESS.WID; } @Override - public Field field3() { + public Field field3() { return WorkflowUserAccess.WORKFLOW_USER_ACCESS.PRIVILEGE; } @Override - public UInteger component1() { + public Integer component1() { return getUid(); } @Override - public UInteger component2() { + public Integer component2() { return getWid(); } @Override - public WorkflowUserAccessPrivilege component3() { + public PrivilegeEnum component3() { return getPrivilege(); } @Override - public UInteger value1() { + public Integer value1() { return getUid(); } @Override - public UInteger value2() { + public Integer value2() { return getWid(); } @Override - public WorkflowUserAccessPrivilege value3() { + public PrivilegeEnum value3() { return getPrivilege(); } @Override - public WorkflowUserAccessRecord value1(UInteger value) { + public WorkflowUserAccessRecord value1(Integer value) { setUid(value); return this; } @Override - public WorkflowUserAccessRecord value2(UInteger value) { + public WorkflowUserAccessRecord value2(Integer value) { setWid(value); return this; } @Override - public WorkflowUserAccessRecord value3(WorkflowUserAccessPrivilege value) { + public WorkflowUserAccessRecord value3(PrivilegeEnum value) { setPrivilege(value); return this; } @Override - public WorkflowUserAccessRecord values(UInteger value1, UInteger value2, WorkflowUserAccessPrivilege value3) { + public WorkflowUserAccessRecord values(Integer value1, Integer value2, PrivilegeEnum value3) { value1(value1); value2(value2); value3(value3); @@ -197,11 +196,24 @@ public WorkflowUserAccessRecord() { /** * Create a detached, initialised WorkflowUserAccessRecord */ - public WorkflowUserAccessRecord(UInteger uid, UInteger wid, WorkflowUserAccessPrivilege privilege) { + public WorkflowUserAccessRecord(Integer uid, Integer wid, PrivilegeEnum privilege) { super(WorkflowUserAccess.WORKFLOW_USER_ACCESS); - set(0, uid); - set(1, wid); - set(2, privilege); + setUid(uid); + setWid(wid); + setPrivilege(privilege); + } + + /** + * Create a detached, initialised WorkflowUserAccessRecord + */ + public WorkflowUserAccessRecord(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowUserAccess value) { + super(WorkflowUserAccess.WORKFLOW_USER_ACCESS); + + if (value != null) { + setUid(value.getUid()); + setWid(value.getWid()); + setPrivilege(value.getPrivilege()); + } } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowUserClonesRecord.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowUserClonesRecord.java index 1d331602c14..30d7a37b8cb 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowUserClonesRecord.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowUserClonesRecord.java @@ -11,22 +11,21 @@ import org.jooq.Record2; import org.jooq.Row2; import org.jooq.impl.UpdatableRecordImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class WorkflowUserClonesRecord extends UpdatableRecordImpl implements Record2, IWorkflowUserClones { +public class WorkflowUserClonesRecord extends UpdatableRecordImpl implements Record2, IWorkflowUserClones { - private static final long serialVersionUID = 695281574; + private static final long serialVersionUID = 1L; /** * Setter for texera_db.workflow_user_clones.uid. */ @Override - public void setUid(UInteger value) { + public void setUid(Integer value) { set(0, value); } @@ -34,15 +33,15 @@ public void setUid(UInteger value) { * Getter for texera_db.workflow_user_clones.uid. */ @Override - public UInteger getUid() { - return (UInteger) get(0); + public Integer getUid() { + return (Integer) get(0); } /** * Setter for texera_db.workflow_user_clones.wid. */ @Override - public void setWid(UInteger value) { + public void setWid(Integer value) { set(1, value); } @@ -50,8 +49,8 @@ public void setWid(UInteger value) { * Getter for texera_db.workflow_user_clones.wid. */ @Override - public UInteger getWid() { - return (UInteger) get(1); + public Integer getWid() { + return (Integer) get(1); } // ------------------------------------------------------------------------- @@ -59,7 +58,7 @@ public UInteger getWid() { // ------------------------------------------------------------------------- @Override - public Record2 key() { + public Record2 key() { return (Record2) super.key(); } @@ -68,59 +67,59 @@ public Record2 key() { // ------------------------------------------------------------------------- @Override - public Row2 fieldsRow() { + public Row2 fieldsRow() { return (Row2) super.fieldsRow(); } @Override - public Row2 valuesRow() { + public Row2 valuesRow() { return (Row2) super.valuesRow(); } @Override - public Field field1() { + public Field field1() { return WorkflowUserClones.WORKFLOW_USER_CLONES.UID; } @Override - public Field field2() { + public Field field2() { return WorkflowUserClones.WORKFLOW_USER_CLONES.WID; } @Override - public UInteger component1() { + public Integer component1() { return getUid(); } @Override - public UInteger component2() { + public Integer component2() { return getWid(); } @Override - public UInteger value1() { + public Integer value1() { return getUid(); } @Override - public UInteger value2() { + public Integer value2() { return getWid(); } @Override - public WorkflowUserClonesRecord value1(UInteger value) { + public WorkflowUserClonesRecord value1(Integer value) { setUid(value); return this; } @Override - public WorkflowUserClonesRecord value2(UInteger value) { + public WorkflowUserClonesRecord value2(Integer value) { setWid(value); return this; } @Override - public WorkflowUserClonesRecord values(UInteger value1, UInteger value2) { + public WorkflowUserClonesRecord values(Integer value1, Integer value2) { value1(value1); value2(value2); return this; @@ -156,10 +155,22 @@ public WorkflowUserClonesRecord() { /** * Create a detached, initialised WorkflowUserClonesRecord */ - public WorkflowUserClonesRecord(UInteger uid, UInteger wid) { + public WorkflowUserClonesRecord(Integer uid, Integer wid) { super(WorkflowUserClones.WORKFLOW_USER_CLONES); - set(0, uid); - set(1, wid); + setUid(uid); + setWid(wid); + } + + /** + * Create a detached, initialised WorkflowUserClonesRecord + */ + public WorkflowUserClonesRecord(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowUserClones value) { + super(WorkflowUserClones.WORKFLOW_USER_CLONES); + + if (value != null) { + setUid(value.getUid()); + setWid(value.getWid()); + } } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowUserLikesRecord.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowUserLikesRecord.java index fce1877f349..6712a95b798 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowUserLikesRecord.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowUserLikesRecord.java @@ -11,22 +11,21 @@ import org.jooq.Record2; import org.jooq.Row2; import org.jooq.impl.UpdatableRecordImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class WorkflowUserLikesRecord extends UpdatableRecordImpl implements Record2, IWorkflowUserLikes { +public class WorkflowUserLikesRecord extends UpdatableRecordImpl implements Record2, IWorkflowUserLikes { - private static final long serialVersionUID = -1808144318; + private static final long serialVersionUID = 1L; /** * Setter for texera_db.workflow_user_likes.uid. */ @Override - public void setUid(UInteger value) { + public void setUid(Integer value) { set(0, value); } @@ -34,15 +33,15 @@ public void setUid(UInteger value) { * Getter for texera_db.workflow_user_likes.uid. */ @Override - public UInteger getUid() { - return (UInteger) get(0); + public Integer getUid() { + return (Integer) get(0); } /** * Setter for texera_db.workflow_user_likes.wid. */ @Override - public void setWid(UInteger value) { + public void setWid(Integer value) { set(1, value); } @@ -50,8 +49,8 @@ public void setWid(UInteger value) { * Getter for texera_db.workflow_user_likes.wid. */ @Override - public UInteger getWid() { - return (UInteger) get(1); + public Integer getWid() { + return (Integer) get(1); } // ------------------------------------------------------------------------- @@ -59,7 +58,7 @@ public UInteger getWid() { // ------------------------------------------------------------------------- @Override - public Record2 key() { + public Record2 key() { return (Record2) super.key(); } @@ -68,59 +67,59 @@ public Record2 key() { // ------------------------------------------------------------------------- @Override - public Row2 fieldsRow() { + public Row2 fieldsRow() { return (Row2) super.fieldsRow(); } @Override - public Row2 valuesRow() { + public Row2 valuesRow() { return (Row2) super.valuesRow(); } @Override - public Field field1() { + public Field field1() { return WorkflowUserLikes.WORKFLOW_USER_LIKES.UID; } @Override - public Field field2() { + public Field field2() { return WorkflowUserLikes.WORKFLOW_USER_LIKES.WID; } @Override - public UInteger component1() { + public Integer component1() { return getUid(); } @Override - public UInteger component2() { + public Integer component2() { return getWid(); } @Override - public UInteger value1() { + public Integer value1() { return getUid(); } @Override - public UInteger value2() { + public Integer value2() { return getWid(); } @Override - public WorkflowUserLikesRecord value1(UInteger value) { + public WorkflowUserLikesRecord value1(Integer value) { setUid(value); return this; } @Override - public WorkflowUserLikesRecord value2(UInteger value) { + public WorkflowUserLikesRecord value2(Integer value) { setWid(value); return this; } @Override - public WorkflowUserLikesRecord values(UInteger value1, UInteger value2) { + public WorkflowUserLikesRecord values(Integer value1, Integer value2) { value1(value1); value2(value2); return this; @@ -156,10 +155,22 @@ public WorkflowUserLikesRecord() { /** * Create a detached, initialised WorkflowUserLikesRecord */ - public WorkflowUserLikesRecord(UInteger uid, UInteger wid) { + public WorkflowUserLikesRecord(Integer uid, Integer wid) { super(WorkflowUserLikes.WORKFLOW_USER_LIKES); - set(0, uid); - set(1, wid); + setUid(uid); + setWid(wid); + } + + /** + * Create a detached, initialised WorkflowUserLikesRecord + */ + public WorkflowUserLikesRecord(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowUserLikes value) { + super(WorkflowUserLikes.WORKFLOW_USER_LIKES); + + if (value != null) { + setUid(value.getUid()); + setWid(value.getWid()); + } } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowVersionRecord.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowVersionRecord.java index 260e14e5070..0305869b6a7 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowVersionRecord.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowVersionRecord.java @@ -14,22 +14,21 @@ import org.jooq.Record4; import org.jooq.Row4; import org.jooq.impl.UpdatableRecordImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class WorkflowVersionRecord extends UpdatableRecordImpl implements Record4, IWorkflowVersion { +public class WorkflowVersionRecord extends UpdatableRecordImpl implements Record4, IWorkflowVersion { - private static final long serialVersionUID = -1023813081; + private static final long serialVersionUID = 1L; /** * Setter for texera_db.workflow_version.vid. */ @Override - public void setVid(UInteger value) { + public void setVid(Integer value) { set(0, value); } @@ -37,15 +36,15 @@ public void setVid(UInteger value) { * Getter for texera_db.workflow_version.vid. */ @Override - public UInteger getVid() { - return (UInteger) get(0); + public Integer getVid() { + return (Integer) get(0); } /** * Setter for texera_db.workflow_version.wid. */ @Override - public void setWid(UInteger value) { + public void setWid(Integer value) { set(1, value); } @@ -53,8 +52,8 @@ public void setWid(UInteger value) { * Getter for texera_db.workflow_version.wid. */ @Override - public UInteger getWid() { - return (UInteger) get(1); + public Integer getWid() { + return (Integer) get(1); } /** @@ -94,7 +93,7 @@ public Timestamp getCreationTime() { // ------------------------------------------------------------------------- @Override - public Record1 key() { + public Record1 key() { return (Record1) super.key(); } @@ -103,22 +102,22 @@ public Record1 key() { // ------------------------------------------------------------------------- @Override - public Row4 fieldsRow() { + public Row4 fieldsRow() { return (Row4) super.fieldsRow(); } @Override - public Row4 valuesRow() { + public Row4 valuesRow() { return (Row4) super.valuesRow(); } @Override - public Field field1() { + public Field field1() { return WorkflowVersion.WORKFLOW_VERSION.VID; } @Override - public Field field2() { + public Field field2() { return WorkflowVersion.WORKFLOW_VERSION.WID; } @@ -133,12 +132,12 @@ public Field field4() { } @Override - public UInteger component1() { + public Integer component1() { return getVid(); } @Override - public UInteger component2() { + public Integer component2() { return getWid(); } @@ -153,12 +152,12 @@ public Timestamp component4() { } @Override - public UInteger value1() { + public Integer value1() { return getVid(); } @Override - public UInteger value2() { + public Integer value2() { return getWid(); } @@ -173,13 +172,13 @@ public Timestamp value4() { } @Override - public WorkflowVersionRecord value1(UInteger value) { + public WorkflowVersionRecord value1(Integer value) { setVid(value); return this; } @Override - public WorkflowVersionRecord value2(UInteger value) { + public WorkflowVersionRecord value2(Integer value) { setWid(value); return this; } @@ -197,7 +196,7 @@ public WorkflowVersionRecord value4(Timestamp value) { } @Override - public WorkflowVersionRecord values(UInteger value1, UInteger value2, String value3, Timestamp value4) { + public WorkflowVersionRecord values(Integer value1, Integer value2, String value3, Timestamp value4) { value1(value1); value2(value2); value3(value3); @@ -237,12 +236,26 @@ public WorkflowVersionRecord() { /** * Create a detached, initialised WorkflowVersionRecord */ - public WorkflowVersionRecord(UInteger vid, UInteger wid, String content, Timestamp creationTime) { + public WorkflowVersionRecord(Integer vid, Integer wid, String content, Timestamp creationTime) { super(WorkflowVersion.WORKFLOW_VERSION); - set(0, vid); - set(1, wid); - set(2, content); - set(3, creationTime); + setVid(vid); + setWid(wid); + setContent(content); + setCreationTime(creationTime); + } + + /** + * Create a detached, initialised WorkflowVersionRecord + */ + public WorkflowVersionRecord(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowVersion value) { + super(WorkflowVersion.WORKFLOW_VERSION); + + if (value != null) { + setVid(value.getVid()); + setWid(value.getWid()); + setContent(value.getContent()); + setCreationTime(value.getCreationTime()); + } } } diff --git a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowViewCountRecord.java b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowViewCountRecord.java index b6621839bb1..7e06b63e52a 100644 --- a/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowViewCountRecord.java +++ b/core/dao/src/main/scala/edu/uci/ics/texera/dao/jooq/generated/tables/records/WorkflowViewCountRecord.java @@ -12,22 +12,21 @@ import org.jooq.Record2; import org.jooq.Row2; import org.jooq.impl.UpdatableRecordImpl; -import org.jooq.types.UInteger; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class WorkflowViewCountRecord extends UpdatableRecordImpl implements Record2, IWorkflowViewCount { +public class WorkflowViewCountRecord extends UpdatableRecordImpl implements Record2, IWorkflowViewCount { - private static final long serialVersionUID = 1060055745; + private static final long serialVersionUID = 1L; /** * Setter for texera_db.workflow_view_count.wid. */ @Override - public void setWid(UInteger value) { + public void setWid(Integer value) { set(0, value); } @@ -35,15 +34,15 @@ public void setWid(UInteger value) { * Getter for texera_db.workflow_view_count.wid. */ @Override - public UInteger getWid() { - return (UInteger) get(0); + public Integer getWid() { + return (Integer) get(0); } /** * Setter for texera_db.workflow_view_count.view_count. */ @Override - public void setViewCount(UInteger value) { + public void setViewCount(Integer value) { set(1, value); } @@ -51,8 +50,8 @@ public void setViewCount(UInteger value) { * Getter for texera_db.workflow_view_count.view_count. */ @Override - public UInteger getViewCount() { - return (UInteger) get(1); + public Integer getViewCount() { + return (Integer) get(1); } // ------------------------------------------------------------------------- @@ -60,7 +59,7 @@ public UInteger getViewCount() { // ------------------------------------------------------------------------- @Override - public Record1 key() { + public Record1 key() { return (Record1) super.key(); } @@ -69,59 +68,59 @@ public Record1 key() { // ------------------------------------------------------------------------- @Override - public Row2 fieldsRow() { + public Row2 fieldsRow() { return (Row2) super.fieldsRow(); } @Override - public Row2 valuesRow() { + public Row2 valuesRow() { return (Row2) super.valuesRow(); } @Override - public Field field1() { + public Field field1() { return WorkflowViewCount.WORKFLOW_VIEW_COUNT.WID; } @Override - public Field field2() { + public Field field2() { return WorkflowViewCount.WORKFLOW_VIEW_COUNT.VIEW_COUNT; } @Override - public UInteger component1() { + public Integer component1() { return getWid(); } @Override - public UInteger component2() { + public Integer component2() { return getViewCount(); } @Override - public UInteger value1() { + public Integer value1() { return getWid(); } @Override - public UInteger value2() { + public Integer value2() { return getViewCount(); } @Override - public WorkflowViewCountRecord value1(UInteger value) { + public WorkflowViewCountRecord value1(Integer value) { setWid(value); return this; } @Override - public WorkflowViewCountRecord value2(UInteger value) { + public WorkflowViewCountRecord value2(Integer value) { setViewCount(value); return this; } @Override - public WorkflowViewCountRecord values(UInteger value1, UInteger value2) { + public WorkflowViewCountRecord values(Integer value1, Integer value2) { value1(value1); value2(value2); return this; @@ -157,10 +156,22 @@ public WorkflowViewCountRecord() { /** * Create a detached, initialised WorkflowViewCountRecord */ - public WorkflowViewCountRecord(UInteger wid, UInteger viewCount) { + public WorkflowViewCountRecord(Integer wid, Integer viewCount) { super(WorkflowViewCount.WORKFLOW_VIEW_COUNT); - set(0, wid); - set(1, viewCount); + setWid(wid); + setViewCount(viewCount); + } + + /** + * Create a detached, initialised WorkflowViewCountRecord + */ + public WorkflowViewCountRecord(edu.uci.ics.texera.dao.jooq.generated.tables.pojos.WorkflowViewCount value) { + super(WorkflowViewCount.WORKFLOW_VIEW_COUNT); + + if (value != null) { + setWid(value.getWid()); + setViewCount(value.getViewCount()); + } } } diff --git a/core/dao/src/test/scala/edu/uci/ics/texera/dao/MockTexeraDB.scala b/core/dao/src/test/scala/edu/uci/ics/texera/dao/MockTexeraDB.scala index edfc5d0b5ca..b6384e3e2e8 100644 --- a/core/dao/src/test/scala/edu/uci/ics/texera/dao/MockTexeraDB.scala +++ b/core/dao/src/test/scala/edu/uci/ics/texera/dao/MockTexeraDB.scala @@ -1,61 +1,27 @@ package edu.uci.ics.texera.dao -import ch.vorburger.mariadb4j.{DB, DBConfigurationBuilder} -import com.mysql.cj.jdbc.MysqlDataSource -import org.jooq.DSLContext +import io.zonky.test.db.postgres.embedded.EmbeddedPostgres +import org.jooq.{DSLContext, SQLDialect} import org.jooq.impl.DSL -import java.io.{File, FileInputStream, InputStream} -import java.nio.file.{Path, Paths} -import java.sql.{Connection, DriverManager, SQLException, Statement} -import java.util.Scanner +import java.nio.file.Paths +import java.sql.{Connection, DriverManager} +import scala.io.Source trait MockTexeraDB { - private var dbInstance: Option[DB] = None + private var dbInstance: Option[EmbeddedPostgres] = None private var dslContext: Option[DSLContext] = None private val database: String = "texera_db" - private val username: String = "root" + private val username: String = "postgres" private val password: String = "" - def executeScriptInJDBC(path: Path): Unit = { + def executeScriptInJDBC(conn: Connection, script: String): Unit = { assert(dbInstance.nonEmpty) - val sqlFile = new File(path.toString) - val in = new FileInputStream(sqlFile) - val conn = - DriverManager.getConnection( - dbInstance.get.getConfiguration.getURL(""), - username, - password - ) - importSQL(conn, in) + conn.prepareStatement(script).execute() conn.close() } - @throws[SQLException] - private def importSQL(conn: Connection, in: InputStream): Unit = { - val s = new Scanner(in) - s.useDelimiter(";") - var st: Statement = null - try { - st = conn.createStatement() - while ({ - s.hasNext - }) { - var line = s.next - if (line.startsWith("/*!") && line.endsWith("*/")) { - val i = line.indexOf(' ') - line = line.substring(i + 1, line.length - " */".length) - } - if (line.trim.nonEmpty) { - // mock DB cannot use SET PERSIST keyword - line = line.replaceAll("(?i)SET PERSIST", "SET GLOBAL") - st.execute(line) - } - } - } finally if (st != null) st.close() - } - def getDSLContext: DSLContext = { dslContext match { case Some(value) => value @@ -66,7 +32,7 @@ trait MockTexeraDB { } } - def getDBInstance: DB = { + def getDBInstance: EmbeddedPostgres = { dbInstance match { case Some(value) => value case None => @@ -79,7 +45,7 @@ trait MockTexeraDB { def shutdownDB(): Unit = { dbInstance match { case Some(value) => - value.stop() + value.close() dbInstance = None dslContext = None case None => @@ -90,32 +56,35 @@ trait MockTexeraDB { def initializeDBAndReplaceDSLContext(): Unit = { assert(dbInstance.isEmpty && dslContext.isEmpty) - val driver = new com.mysql.cj.jdbc.Driver() + val driver = new org.postgresql.Driver() DriverManager.registerDriver(driver) - val config = DBConfigurationBuilder.newBuilder - .setPort(0) // 0 => automatically detect free port - .addArg("--default-time-zone=-8:00") - .setSecurityDisabled(true) - .setDeletingTemporaryBaseAndDataDirsOnShutdown(true) - .build() + val embedded = EmbeddedPostgres.builder().start() - val db = DB.newEmbeddedDB(config) - db.start() - - val dataSource = new MysqlDataSource - dataSource.setUrl(config.getURL(database)) - dataSource.setUser(username) - dataSource.setPassword(password) - - val sqlServerInstance = SqlServer.getInstance(database, username, password) - dbInstance = Some(db) - dslContext = Some(DSL.using(dataSource, sqlServerInstance.SQL_DIALECT)) + dbInstance = Some(embedded) val ddlPath = { Paths.get("./scripts/sql/texera_ddl.sql").toRealPath() } - executeScriptInJDBC(ddlPath) + val source = Source.fromFile(ddlPath.toString) + val content = + try { + source.mkString + } finally { + source.close() + } + val parts: Array[String] = content.split("(?m)^\\\\c texera_db") + def removeCCommands(sql: String): String = + sql.linesIterator + .filterNot(_.trim.startsWith("\\c")) + .mkString("\n") + executeScriptInJDBC(embedded.getPostgresDatabase.getConnection, removeCCommands(parts(0))) + val texeraDB = embedded.getDatabase(username, database) + executeScriptInJDBC(texeraDB.getConnection, removeCCommands(parts(1))) + + SqlServer.initConnection(embedded.getJdbcUrl(username, database), username, password) + val sqlServerInstance = SqlServer.getInstance() + dslContext = Some(DSL.using(texeraDB, SQLDialect.POSTGRES)) sqlServerInstance.replaceDSLContext(dslContext.get) } diff --git a/core/scripts/sql/texera_ddl.sql b/core/scripts/sql/texera_ddl.sql index 16b33a3ae1c..bece5799334 100644 --- a/core/scripts/sql/texera_ddl.sql +++ b/core/scripts/sql/texera_ddl.sql @@ -1,286 +1,351 @@ -CREATE SCHEMA IF NOT EXISTS `texera_db`; -USE `texera_db`; - -DROP TABLE IF EXISTS operator_executions; -DROP TABLE IF EXISTS operator_port_executions; -DROP TABLE IF EXISTS `workflow_user_access`; -DROP TABLE IF EXISTS `workflow_of_user`; -DROP TABLE IF EXISTS `user_config`; -DROP TABLE IF EXISTS `user`; -DROP TABLE IF EXISTS `workflow`; -DROP TABLE IF EXISTS `workflow_version`; -DROP TABLE IF EXISTS `project`; -DROP TABLE IF EXISTS `workflow_of_project`; -DROP TABLE IF EXISTS `workflow_executions`; -DROP TABLE IF EXISTS `dataset`; -DROP TABLE IF EXISTS `dataset_user_access`; -DROP TABLE IF EXISTS `dataset_version`; -DROP TABLE IF EXISTS operator_executions; -DROP TABLE IF EXISTS operator_runtime_statistics; -DROP TABLE IF EXISTS `dataset_user_likes`; -DROP TABLE IF EXISTS dataset_view_count; - -SET PERSIST time_zone = '+00:00'; -- this line is mandatory -SET PERSIST sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY','')); - -CREATE TABLE IF NOT EXISTS user +-- ============================================ +-- 1. Drop and recreate the database (psql only) +-- Remove if you already created texera_db +-- ============================================ +\c postgres +DROP DATABASE IF EXISTS texera_db; +CREATE DATABASE texera_db; + +-- ============================================ +-- 2. Connect to the new database (psql only) +-- ============================================ +\c texera_db + +CREATE SCHEMA IF NOT EXISTS texera_db; +SET search_path TO texera_db, public; + +-- ============================================ +-- 3. Drop all tables if they exist +-- (CASCADE handles FK dependencies) +-- ============================================ +DROP TABLE IF EXISTS operator_executions CASCADE; +DROP TABLE IF EXISTS operator_port_executions CASCADE; +DROP TABLE IF EXISTS workflow_user_access CASCADE; +DROP TABLE IF EXISTS workflow_of_user CASCADE; +DROP TABLE IF EXISTS user_config CASCADE; +DROP TABLE IF EXISTS "user" CASCADE; +DROP TABLE IF EXISTS workflow CASCADE; +DROP TABLE IF EXISTS workflow_version CASCADE; +DROP TABLE IF EXISTS project CASCADE; +DROP TABLE IF EXISTS workflow_of_project CASCADE; +DROP TABLE IF EXISTS workflow_executions CASCADE; +DROP TABLE IF EXISTS dataset CASCADE; +DROP TABLE IF EXISTS dataset_user_access CASCADE; +DROP TABLE IF EXISTS dataset_version CASCADE; +DROP TABLE IF EXISTS public_project CASCADE; +DROP TABLE IF EXISTS project_user_access CASCADE; +DROP TABLE IF EXISTS workflow_user_likes CASCADE; +DROP TABLE IF EXISTS workflow_user_clones CASCADE; +DROP TABLE IF EXISTS workflow_view_count CASCADE; +DROP TABLE IF EXISTS workflow_user_activity CASCADE; +DROP TABLE IF EXISTS user_activity CASCADE; +DROP TABLE IF EXISTS dataset_user_likes CASCADE; +DROP TABLE IF EXISTS dataset_view_count CASCADE; + +-- ============================================ +-- 4. Create PostgreSQL enum types +-- to mimic MySQL ENUM fields +-- ============================================ +DROP TYPE IF EXISTS user_role_enum CASCADE; +DROP TYPE IF EXISTS privilege_enum CASCADE; + +CREATE TYPE user_role_enum AS ENUM ('INACTIVE', 'RESTRICTED', 'REGULAR', 'ADMIN'); +CREATE TYPE privilege_enum AS ENUM ('NONE', 'READ', 'WRITE'); + +-- ============================================ +-- 5. Create tables +-- ============================================ + +-- "user" table +CREATE TABLE IF NOT EXISTS "user" ( - `uid` INT UNSIGNED AUTO_INCREMENT NOT NULL, - `name` VARCHAR(256) NOT NULL, - `email` VARCHAR(256) UNIQUE, - `password` VARCHAR(256), - `google_id` VARCHAR(256) UNIQUE, - `role` ENUM('INACTIVE', 'RESTRICTED', 'REGULAR', 'ADMIN') NOT NULL DEFAULT 'INACTIVE', - `google_avatar` VARCHAR(100) null, - PRIMARY KEY (`uid`), - CONSTRAINT CK_nulltest - CHECK (`password` IS NOT NULL OR `google_id` IS NOT NULL) -) ENGINE = INNODB, --- start auto increment userID from 1 because userID 0 means user not exists - AUTO_INCREMENT = 1; - + uid SERIAL PRIMARY KEY, + name VARCHAR(256) NOT NULL, + email VARCHAR(256) UNIQUE, + password VARCHAR(256), + google_id VARCHAR(256) UNIQUE, + google_avatar VARCHAR(100), + role user_role_enum NOT NULL DEFAULT 'INACTIVE', + -- check that either password or google_id is not null + CONSTRAINT ck_nulltest CHECK ((password IS NOT NULL) OR (google_id IS NOT NULL)) + ); + +-- user_config CREATE TABLE IF NOT EXISTS user_config ( - `uid` INT UNSIGNED NOT NULL, - `key` varchar(256) NOT NULL, - `value` text NOT NULL, - PRIMARY KEY (`uid`, `key`), - FOREIGN KEY (`uid`) REFERENCES user (`uid`) ON DELETE CASCADE -) ENGINE = InnoDB; - + uid INT NOT NULL, + key VARCHAR(256) NOT NULL, + value TEXT NOT NULL, + PRIMARY KEY (uid, key), + FOREIGN KEY (uid) REFERENCES "user"(uid) ON DELETE CASCADE + ); + +-- workflow CREATE TABLE IF NOT EXISTS workflow ( - `name` VARCHAR(128) NOT NULL, - `description` VARCHAR(500), - `wid` INT UNSIGNED AUTO_INCREMENT NOT NULL, - `content` LONGTEXT NOT NULL, - `creation_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - `last_modified_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`wid`) -) ENGINE = INNODB, - AUTO_INCREMENT = 1; - + wid SERIAL PRIMARY KEY, + name VARCHAR(128) NOT NULL, + description VARCHAR(500), + content TEXT NOT NULL, + creation_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + last_modified_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + is_public BOOLEAN NOT NULL DEFAULT false + ); + +-- workflow_of_user CREATE TABLE IF NOT EXISTS workflow_of_user ( - `uid` INT UNSIGNED NOT NULL, - `wid` INT UNSIGNED NOT NULL, - PRIMARY KEY (`uid`, `wid`), - FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON DELETE CASCADE, - FOREIGN KEY (`wid`) REFERENCES `workflow` (`wid`) ON DELETE CASCADE -) ENGINE = INNODB; - + uid INT NOT NULL, + wid INT NOT NULL, + PRIMARY KEY (uid, wid), + FOREIGN KEY (uid) REFERENCES "user"(uid) ON DELETE CASCADE, + FOREIGN KEY (wid) REFERENCES workflow(wid) ON DELETE CASCADE + ); + +-- workflow_user_access CREATE TABLE IF NOT EXISTS workflow_user_access ( - `uid` INT UNSIGNED NOT NULL, - `wid` INT UNSIGNED NOT NULL, - `privilege` ENUM('NONE', 'READ', 'WRITE') NOT NULL DEFAULT 'NONE', - PRIMARY KEY (`uid`, `wid`), - FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON DELETE CASCADE, - FOREIGN KEY (`wid`) REFERENCES `workflow` (`wid`) ON DELETE CASCADE -) ENGINE = INNODB; - + uid INT NOT NULL, + wid INT NOT NULL, + privilege privilege_enum NOT NULL DEFAULT 'NONE', + PRIMARY KEY (uid, wid), + FOREIGN KEY (uid) REFERENCES "user"(uid) ON DELETE CASCADE, + FOREIGN KEY (wid) REFERENCES workflow(wid) ON DELETE CASCADE + ); + +-- workflow_version CREATE TABLE IF NOT EXISTS workflow_version ( - `vid` INT UNSIGNED AUTO_INCREMENT NOT NULL, - `wid` INT UNSIGNED NOT NULL, - `content` TEXT NOT NULL, - `creation_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`vid`), - FOREIGN KEY (`wid`) REFERENCES `workflow` (`wid`) ON DELETE CASCADE -) ENGINE = INNODB; - + vid SERIAL PRIMARY KEY, + wid INT NOT NULL, + content TEXT NOT NULL, + creation_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + FOREIGN KEY (wid) REFERENCES workflow(wid) ON DELETE CASCADE + ); + +-- project CREATE TABLE IF NOT EXISTS project ( - `pid` INT UNSIGNED AUTO_INCREMENT NOT NULL, - `name` VARCHAR(128) NOT NULL, - `description` VARCHAR(10000), - `owner_id` INT UNSIGNED NOT NULL, - `creation_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - `color` VARCHAR(6), - UNIQUE(`owner_id`, `name`), - PRIMARY KEY (`pid`), - FOREIGN KEY (`owner_id`) REFERENCES user (`uid`) ON DELETE CASCADE -) ENGINE = INNODB, - AUTO_INCREMENT = 1; - + pid SERIAL PRIMARY KEY, + name VARCHAR(128) NOT NULL, + description VARCHAR(10000), + owner_id INT NOT NULL, + creation_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + color VARCHAR(6), + UNIQUE (owner_id, name), + FOREIGN KEY (owner_id) REFERENCES "user"(uid) ON DELETE CASCADE + ); + +-- workflow_of_project CREATE TABLE IF NOT EXISTS workflow_of_project ( - `wid` INT UNSIGNED NOT NULL, - `pid` INT UNSIGNED NOT NULL, - PRIMARY KEY (`wid`, `pid`), - FOREIGN KEY (`wid`) REFERENCES `workflow` (`wid`) ON DELETE CASCADE, - FOREIGN KEY (`pid`) REFERENCES `project` (`pid`) ON DELETE CASCADE -) ENGINE = INNODB; - + wid INT NOT NULL, + pid INT NOT NULL, + PRIMARY KEY (wid, pid), + FOREIGN KEY (wid) REFERENCES workflow(wid) ON DELETE CASCADE, + FOREIGN KEY (pid) REFERENCES project(pid) ON DELETE CASCADE + ); + +-- project_user_access CREATE TABLE IF NOT EXISTS project_user_access ( - `uid` INT UNSIGNED NOT NULL, - `pid` INT UNSIGNED NOT NULL, - `privilege` ENUM('NONE', 'READ', 'WRITE') NOT NULL DEFAULT 'NONE', - PRIMARY KEY (`uid`, `pid`), - FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON DELETE CASCADE, - FOREIGN KEY (`pid`) REFERENCES `project` (`pid`) ON DELETE CASCADE -) ENGINE = INNODB; - + uid INT NOT NULL, + pid INT NOT NULL, + privilege privilege_enum NOT NULL DEFAULT 'NONE', + PRIMARY KEY (uid, pid), + FOREIGN KEY (uid) REFERENCES "user"(uid) ON DELETE CASCADE, + FOREIGN KEY (pid) REFERENCES project(pid) ON DELETE CASCADE + ); + +-- workflow_executions CREATE TABLE IF NOT EXISTS workflow_executions ( - `eid` INT UNSIGNED AUTO_INCREMENT NOT NULL, - `vid` INT UNSIGNED NOT NULL, - `uid` INT UNSIGNED NOT NULL, - `status` TINYINT NOT NULL DEFAULT 1, - `result` TEXT, /* pointer to volume */ - `starting_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - `last_update_time` TIMESTAMP, - `bookmarked` BOOLEAN DEFAULT FALSE, - `name` VARCHAR(128) NOT NULL DEFAULT 'Untitled Execution', - `environment_version` VARCHAR(128) NOT NULL, - `log_location` TEXT, /* uri to log storage */ - `runtime_stats_uri` TEXT DEFAULT NULL, - PRIMARY KEY (`eid`), - FOREIGN KEY (`vid`) REFERENCES `workflow_version` (`vid`) ON DELETE CASCADE, - FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON DELETE CASCADE -) ENGINE = INNODB; - + eid SERIAL PRIMARY KEY, + vid INT NOT NULL, + uid INT NOT NULL, + status SMALLINT NOT NULL DEFAULT 1, + result TEXT, + starting_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + last_update_time TIMESTAMP, + bookmarked BOOLEAN DEFAULT FALSE, + name VARCHAR(128) NOT NULL DEFAULT 'Untitled Execution', + environment_version VARCHAR(128) NOT NULL, + log_location TEXT, + runtime_stats_uri TEXT, + FOREIGN KEY (vid) REFERENCES workflow_version(vid) ON DELETE CASCADE, + FOREIGN KEY (uid) REFERENCES "user"(uid) ON DELETE CASCADE + ); + +-- public_project CREATE TABLE IF NOT EXISTS public_project ( - `pid` INT UNSIGNED NOT NULL, - `uid` INT UNSIGNED, - PRIMARY KEY (`pid`), - FOREIGN KEY (`pid`) REFERENCES `project` (`pid`) ON DELETE CASCADE -) ENGINE = INNODB; + pid INT PRIMARY KEY, + uid INT, + FOREIGN KEY (pid) REFERENCES project(pid) ON DELETE CASCADE + -- Note: MySQL schema doesn't define a foreign key for uid + ); +-- dataset CREATE TABLE IF NOT EXISTS dataset ( - `did` INT UNSIGNED AUTO_INCREMENT NOT NULL, - `owner_uid` INT UNSIGNED NOT NULL, - `name` VARCHAR(128) NOT NULL, - `is_public` TINYINT NOT NULL DEFAULT 1, - `description` VARCHAR(512) NOT NULL, - `creation_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY(`did`), - FOREIGN KEY (`owner_uid`) REFERENCES `user` (`uid`) ON DELETE CASCADE - ) ENGINE = INNODB; - + did SERIAL PRIMARY KEY, + owner_uid INT NOT NULL, + name VARCHAR(128) NOT NULL, + is_public BOOLEAN NOT NULL DEFAULT TRUE, + description VARCHAR(512) NOT NULL, + creation_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + FOREIGN KEY (owner_uid) REFERENCES "user"(uid) ON DELETE CASCADE + ); + +-- dataset_user_access CREATE TABLE IF NOT EXISTS dataset_user_access ( - `did` INT UNSIGNED NOT NULL, - `uid` INT UNSIGNED NOT NULL, - `privilege` ENUM('NONE', 'READ', 'WRITE') NOT NULL DEFAULT 'NONE', - PRIMARY KEY(`did`, `uid`), - FOREIGN KEY (`did`) REFERENCES `dataset` (`did`) ON DELETE CASCADE, - FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON DELETE CASCADE - ) ENGINE = INNODB; - + did INT NOT NULL, + uid INT NOT NULL, + privilege privilege_enum NOT NULL DEFAULT 'NONE', + PRIMARY KEY (did, uid), + FOREIGN KEY (did) REFERENCES dataset(did) ON DELETE CASCADE, + FOREIGN KEY (uid) REFERENCES "user"(uid) ON DELETE CASCADE + ); + +-- dataset_version CREATE TABLE IF NOT EXISTS dataset_version ( - `dvid` INT UNSIGNED AUTO_INCREMENT NOT NULL, - `did` INT UNSIGNED NOT NULL, - `creator_uid` INT UNSIGNED NOT NULL, - `name` VARCHAR(128) NOT NULL, - `version_hash` VARCHAR(64) NOT NULL, - `creation_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY(`dvid`), - FOREIGN KEY (`did`) REFERENCES `dataset` (`did`) ON DELETE CASCADE - ) ENGINE = INNODB; - - --- create fulltext search indexes - -CREATE FULLTEXT INDEX `idx_workflow_name_description_content` ON `texera_db`.`workflow` (name, description, content); - -CREATE FULLTEXT INDEX `idx_user_name` ON `texera_db`.`user` (name); - -CREATE FULLTEXT INDEX `idx_user_project_name_description` ON `texera_db`.`project` (name, description); - -CREATE FULLTEXT INDEX `idx_dataset_name_description` ON `texera_db`.`dataset` (name, description); - -CREATE FULLTEXT INDEX `idx_dataset_version_name` ON `texera_db`.`dataset_version` (name); - -ALTER TABLE workflow -ADD is_published BOOLEAN NOT NULL DEFAULT false; - + dvid SERIAL PRIMARY KEY, + did INT NOT NULL, + creator_uid INT NOT NULL, + name VARCHAR(128) NOT NULL, + version_hash VARCHAR(64) NOT NULL, + creation_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + FOREIGN KEY (did) REFERENCES dataset(did) ON DELETE CASCADE + ); + +-- operator_executions (modified to match MySQL: no separate primary key; added console_messages_uri) +CREATE TABLE IF NOT EXISTS operator_executions +( + workflow_execution_id INT NOT NULL, + operator_id VARCHAR(100) NOT NULL, + console_messages_uri TEXT, + PRIMARY KEY (workflow_execution_id, operator_id), + FOREIGN KEY (workflow_execution_id) REFERENCES workflow_executions(eid) ON DELETE CASCADE + ); + +-- operator_port_executions (replaces the old operator_runtime_statistics) +CREATE TABLE IF NOT EXISTS operator_port_executions +( + workflow_execution_id INT NOT NULL, + operator_id VARCHAR(100) NOT NULL, + port_id INT NOT NULL, + result_uri TEXT, + PRIMARY KEY (workflow_execution_id, operator_id, port_id), + FOREIGN KEY (workflow_execution_id) REFERENCES workflow_executions(eid) ON DELETE CASCADE + ); + +-- workflow_user_likes CREATE TABLE IF NOT EXISTS workflow_user_likes ( - `uid` INT UNSIGNED NOT NULL, - `wid` INT UNSIGNED NOT NULL, - PRIMARY KEY (`uid`, `wid`), - FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON DELETE CASCADE, - FOREIGN KEY (`wid`) REFERENCES `workflow` (`wid`) ON DELETE CASCADE - ) ENGINE = INNODB; - + uid INT NOT NULL, + wid INT NOT NULL, + PRIMARY KEY (uid, wid), + FOREIGN KEY (uid) REFERENCES "user"(uid) ON DELETE CASCADE, + FOREIGN KEY (wid) REFERENCES workflow(wid) ON DELETE CASCADE + ); + +-- workflow_user_clones CREATE TABLE IF NOT EXISTS workflow_user_clones ( - `uid` INT UNSIGNED NOT NULL, - `wid` INT UNSIGNED NOT NULL, - PRIMARY KEY (`uid`, `wid`), - FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON DELETE CASCADE, - FOREIGN KEY (`wid`) REFERENCES `workflow` (`wid`) ON DELETE CASCADE - ) ENGINE = INNODB; - -CREATE TABLE IF NOT EXISTS workflow_user_activity ( - `uid` INT UNSIGNED NOT NULL DEFAULT 0, - `wid` INT UNSIGNED NOT NULL, - `ip` VARCHAR(15) DEFAULT NULL, - `activate` VARCHAR(10) NOT NULL, - `activity_time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP -) ENGINE = INNODB; - + uid INT NOT NULL, + wid INT NOT NULL, + PRIMARY KEY (uid, wid), + FOREIGN KEY (uid) REFERENCES "user"(uid) ON DELETE CASCADE, + FOREIGN KEY (wid) REFERENCES workflow(wid) ON DELETE CASCADE + ); + +-- workflow_view_count CREATE TABLE IF NOT EXISTS workflow_view_count ( - `wid` INT UNSIGNED NOT NULL, - `view_count` INT UNSIGNED NOT NULL DEFAULT 0, - PRIMARY KEY (`wid`), - FOREIGN KEY (`wid`) REFERENCES `workflow` (`wid`) ON DELETE CASCADE - ) ENGINE = INNODB; - -ALTER TABLE dataset -MODIFY COLUMN is_public BOOLEAN NOT NULL DEFAULT true; - -ALTER TABLE workflow -CHANGE COLUMN is_published is_public BOOLEAN NOT NULL DEFAULT false; - -CREATE TABLE IF NOT EXISTS operator_executions ( - workflow_execution_id INT UNSIGNED NOT NULL, - operator_id VARCHAR(100) NOT NULL, - console_messages_uri TEXT DEFAULT NULL, - UNIQUE (workflow_execution_id, operator_id), - FOREIGN KEY (workflow_execution_id) REFERENCES workflow_executions (eid) ON DELETE CASCADE -); - -CREATE TABLE IF NOT EXISTS operator_port_executions + wid INT NOT NULL PRIMARY KEY, + view_count INT NOT NULL DEFAULT 0, + FOREIGN KEY (wid) REFERENCES workflow(wid) ON DELETE CASCADE + ); + +-- Drop old workflow_user_activity (if any), replace with user_activity +-- user_activity table +CREATE TABLE IF NOT EXISTS user_activity ( - workflow_execution_id INT UNSIGNED NOT NULL, - operator_id VARCHAR(100) NOT NULL, - port_id INT NOT NULL, - result_uri TEXT DEFAULT NULL, - UNIQUE (workflow_execution_id, operator_id, port_id), - FOREIGN KEY (workflow_execution_id) REFERENCES workflow_executions (eid) ON DELETE CASCADE -); - -DROP TABLE IF EXISTS workflow_user_activity; - -CREATE TABLE IF NOT EXISTS user_activity ( - `uid` INT UNSIGNED NOT NULL DEFAULT 0, - `id` INT UNSIGNED NOT NULL, - `type` VARCHAR(15) NOT NULL, - `ip` VARCHAR(15) DEFAULT NULL, - `activate` VARCHAR(10) NOT NULL, - `activity_time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP - - ) ENGINE = INNODB; - + uid INTEGER NOT NULL DEFAULT 0, + id INTEGER NOT NULL, + type VARCHAR(15) NOT NULL, + ip VARCHAR(15) DEFAULT NULL, + activate VARCHAR(10) NOT NULL, + activity_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP + ); + +-- dataset_user_likes table CREATE TABLE IF NOT EXISTS dataset_user_likes ( - `uid` INT UNSIGNED NOT NULL, - `did` INT UNSIGNED NOT NULL, - PRIMARY KEY (`uid`, `did`), - FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON DELETE CASCADE, - FOREIGN KEY (`did`) REFERENCES `dataset` (`did`) ON DELETE CASCADE - ) ENGINE = INNODB; - -CREATE TABLE IF NOT EXISTS `dataset_view_count` ( - `did` INT UNSIGNED NOT NULL, - `view_count` INT UNSIGNED NOT NULL DEFAULT 0, - PRIMARY KEY (`did`), - FOREIGN KEY (`did`) REFERENCES `dataset` (`did`) ON DELETE CASCADE - ) ENGINE = INNODB; \ No newline at end of file + uid INTEGER NOT NULL, + did INTEGER NOT NULL, + PRIMARY KEY (uid, did), + FOREIGN KEY (uid) REFERENCES "user"(uid) ON DELETE CASCADE, + FOREIGN KEY (did) REFERENCES dataset(did) ON DELETE CASCADE + ); + +-- dataset_view_count table +CREATE TABLE IF NOT EXISTS dataset_view_count +( + did INTEGER NOT NULL, + view_count INTEGER NOT NULL DEFAULT 0, + PRIMARY KEY (did), + FOREIGN KEY (did) REFERENCES dataset(did) ON DELETE CASCADE + ); + +-- ============================================ +-- 6. Approximate FULLTEXT indexes with GIN +-- to mirror MySQL FULLTEXT +-- ============================================ +-- (Requires "pg_trgm" extension for more advanced usage.) + +CREATE INDEX idx_workflow_name_description_content + ON workflow + USING GIN ( + to_tsvector('english', + COALESCE(name, '') || ' ' || + COALESCE(description, '') || ' ' || + COALESCE(content, '') + ) + ); + +CREATE INDEX idx_user_name + ON "user" + USING GIN ( + to_tsvector('english', + COALESCE(name, '') + ) + ); + +CREATE INDEX idx_user_project_name_description + ON project + USING GIN ( + to_tsvector('english', + COALESCE(name, '') || ' ' || + COALESCE(description, '') + ) + ); + +CREATE INDEX idx_dataset_name_description + ON dataset + USING GIN ( + to_tsvector('english', + COALESCE(name, '') || ' ' || + COALESCE(description, '') + ) + ); + +CREATE INDEX idx_dataset_version_name + ON dataset_version + USING GIN ( + to_tsvector('english', + COALESCE(name, '') + ) + ); diff --git a/core/scripts/sql/update/01.sql b/core/scripts/sql/update/01.sql deleted file mode 100644 index ee5e62e2e7b..00000000000 --- a/core/scripts/sql/update/01.sql +++ /dev/null @@ -1,7 +0,0 @@ -USE `texera_db`; -CREATE TABLE IF NOT EXISTS public_project -( - `pid` INT UNSIGNED NOT NULL, - PRIMARY KEY (`pid`), - FOREIGN KEY (`pid`) REFERENCES `project` (`pid`) ON DELETE CASCADE - ) ENGINE = INNODB; \ No newline at end of file diff --git a/core/scripts/sql/update/02.sql b/core/scripts/sql/update/02.sql deleted file mode 100644 index 220cdcf2c68..00000000000 --- a/core/scripts/sql/update/02.sql +++ /dev/null @@ -1,3 +0,0 @@ -USE `texera_db`; -ALTER table public_project - ADD uid int unsigned null; diff --git a/core/scripts/sql/update/03.sql b/core/scripts/sql/update/03.sql deleted file mode 100644 index 2d87f752bca..00000000000 --- a/core/scripts/sql/update/03.sql +++ /dev/null @@ -1,3 +0,0 @@ -USE `texera_db`; -ALTER table workflow - MODIFY content longtext not null; diff --git a/core/scripts/sql/update/04.sql b/core/scripts/sql/update/04.sql deleted file mode 100644 index 1c8c05a82e8..00000000000 --- a/core/scripts/sql/update/04.sql +++ /dev/null @@ -1,14 +0,0 @@ -USE `texera_db`; -CREATE TABLE IF NOT EXISTS workflow_runtime_statistics -( - `workflow_id` INT UNSIGNED NOT NULL, - `execution_id` INT UNSIGNED NOT NULL, - `operator_id` VARCHAR(100) NOT NULL, - `time` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), - `input_tuple_cnt` INT UNSIGNED NOT NULL DEFAULT 0, - `output_tuple_cnt` INT UNSIGNED NOT NULL DEFAULT 0, - `status` TINYINT NOT NULL DEFAULT 1, - PRIMARY KEY (`workflow_id`, `execution_id`, `operator_id`, `time`), - FOREIGN KEY (`workflow_id`) REFERENCES `workflow` (`wid`) ON DELETE CASCADE, - FOREIGN KEY (`execution_id`) REFERENCES `workflow_executions` (`eid`) ON DELETE CASCADE -) ENGINE = INNODB; diff --git a/core/scripts/sql/update/05.sql b/core/scripts/sql/update/05.sql deleted file mode 100644 index 7d9bb0b5d20..00000000000 --- a/core/scripts/sql/update/05.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE workflow_executions -ADD log_location TEXT; \ No newline at end of file diff --git a/core/scripts/sql/update/06.sql b/core/scripts/sql/update/06.sql deleted file mode 100644 index 49cbc0759a0..00000000000 --- a/core/scripts/sql/update/06.sql +++ /dev/null @@ -1,8 +0,0 @@ -USE `texera_db`; -ALTER TABLE workflow_runtime_statistics -ADD ( -`data_processing_time` BIGINT UNSIGNED NOT NULL DEFAULT 0, -`control_processing_time` BIGINT UNSIGNED NOT NULL DEFAULT 0, -`idle_time` BIGINT UNSIGNED NOT NULL DEFAULT 0, -`num_workers` INT UNSIGNED NOT NULL DEFAULT 0 -) diff --git a/core/scripts/sql/update/07.sql b/core/scripts/sql/update/07.sql deleted file mode 100644 index 0b8d8463f30..00000000000 --- a/core/scripts/sql/update/07.sql +++ /dev/null @@ -1,41 +0,0 @@ -USE `texera_db`; - --- Create new tables for dataset management -CREATE TABLE IF NOT EXISTS dataset -( - `did` INT UNSIGNED AUTO_INCREMENT NOT NULL, - `owner_uid` INT UNSIGNED NOT NULL, - `name` VARCHAR(128) NOT NULL, - `is_public` TINYINT NOT NULL DEFAULT 1, - `storage_path` VARCHAR(512) NOT NULL, - `description` VARCHAR(512) NOT NULL, - `creation_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY(`did`), - FOREIGN KEY (`owner_uid`) REFERENCES `user` (`uid`) ON DELETE CASCADE -) ENGINE = INNODB; - -CREATE TABLE IF NOT EXISTS dataset_user_access -( - `did` INT UNSIGNED NOT NULL, - `uid` INT UNSIGNED NOT NULL, - `privilege` ENUM('NONE', 'READ', 'WRITE') NOT NULL DEFAULT 'NONE', - PRIMARY KEY(`did`, `uid`), - FOREIGN KEY (`did`) REFERENCES `dataset` (`did`) ON DELETE CASCADE, - FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON DELETE CASCADE -) ENGINE = INNODB; - -CREATE TABLE IF NOT EXISTS dataset_version -( - `dvid` INT UNSIGNED AUTO_INCREMENT NOT NULL, - `did` INT UNSIGNED NOT NULL, - `creator_uid` INT UNSIGNED NOT NULL, - `name` VARCHAR(128) NOT NULL, - `version_hash` VARCHAR(64) NOT NULL, - `creation_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY(`dvid`), - FOREIGN KEY (`did`) REFERENCES `dataset` (`did`) ON DELETE CASCADE -) ENGINE = INNODB; - --- Create fulltext indexes for the new tables -CREATE FULLTEXT INDEX `idx_dataset_name_description` ON `texera_db`.`dataset` (name, description); -CREATE FULLTEXT INDEX `idx_dataset_version_name` ON `texera_db`.`dataset_version` (name); \ No newline at end of file diff --git a/core/scripts/sql/update/08.sql b/core/scripts/sql/update/08.sql deleted file mode 100644 index d17014f40a9..00000000000 --- a/core/scripts/sql/update/08.sql +++ /dev/null @@ -1,4 +0,0 @@ -USE `texera_db`; - -ALTER TABLE dataset -MODIFY COLUMN storage_path VARCHAR(512) NOT NULL DEFAULT ''; diff --git a/core/scripts/sql/update/09.sql b/core/scripts/sql/update/09.sql deleted file mode 100644 index 276e684408c..00000000000 --- a/core/scripts/sql/update/09.sql +++ /dev/null @@ -1,40 +0,0 @@ -USE `texera_db`; - -CREATE TABLE IF NOT EXISTS environment -( - `eid` INT UNSIGNED AUTO_INCREMENT NOT NULL, - `owner_uid` INT UNSIGNED NOT NULL, - `name` VARCHAR(128) NOT NULL DEFAULT 'Untitled Environment', - `description` VARCHAR(1000), - `creation_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`eid`), - FOREIGN KEY (`owner_uid`) REFERENCES `user` (`uid`) ON DELETE CASCADE -) ENGINE = INNODB; - -CREATE TABLE IF NOT EXISTS environment_of_workflow -( - `eid` INT UNSIGNED NOT NULL, - `wid` INT UNSIGNED NOT NULL, - PRIMARY KEY (`eid`, `wid`), - FOREIGN KEY (`wid`) REFERENCES `workflow` (`wid`) ON DELETE CASCADE, - FOREIGN KEY (`eid`) REFERENCES `environment` (`eid`) ON DELETE CASCADE -) ENGINE = INNODB; - -CREATE TABLE IF NOT EXISTS dataset_of_environment -( - `did` INT UNSIGNED NOT NULL, - `eid` INT UNSIGNED NOT NULL, - `dvid` INT UNSIGNED NOT NULL, - PRIMARY KEY (`did`, `eid`), - FOREIGN KEY (`eid`) REFERENCES `environment` (`eid`) ON DELETE CASCADE, - FOREIGN KEY (`dvid`) REFERENCES `dataset_version` (`dvid`) ON DELETE CASCADE -) ENGINE = INNODB; - --- Add the `environment_eid` column to the `workflow_executions` table -ALTER TABLE workflow_executions -ADD COLUMN `environment_eid` INT UNSIGNED; - --- Add the foreign key constraint for `environment_eid` -ALTER TABLE workflow_executions -ADD CONSTRAINT fk_environment_eid -FOREIGN KEY (`environment_eid`) REFERENCES environment(`eid`) ON DELETE SET NULL; \ No newline at end of file diff --git a/core/scripts/sql/update/10.sql b/core/scripts/sql/update/10.sql deleted file mode 100644 index 90741e2d842..00000000000 --- a/core/scripts/sql/update/10.sql +++ /dev/null @@ -1,3 +0,0 @@ -USE `texera_db`; -alter table user - add google_avatar VARCHAR(100) null; \ No newline at end of file diff --git a/core/scripts/sql/update/11.sql b/core/scripts/sql/update/11.sql deleted file mode 100644 index bd8ef05e082..00000000000 --- a/core/scripts/sql/update/11.sql +++ /dev/null @@ -1,3 +0,0 @@ -USE `texera_db`; - -ALTER TABLE dataset DROP COLUMN storage_path; diff --git a/core/scripts/sql/update/12.sql b/core/scripts/sql/update/12.sql deleted file mode 100644 index 24bd29ce7ab..00000000000 --- a/core/scripts/sql/update/12.sql +++ /dev/null @@ -1,4 +0,0 @@ -USE `texera_db`; - -ALTER TABLE texera_db.workflow_runtime_statistics - MODIFY COLUMN operator_id VARCHAR(512); \ No newline at end of file diff --git a/core/scripts/sql/update/13.sql b/core/scripts/sql/update/13.sql deleted file mode 100644 index d0daeb06b26..00000000000 --- a/core/scripts/sql/update/13.sql +++ /dev/null @@ -1,22 +0,0 @@ -use `texera_db`; - -ALTER TABLE `environment_of_workflow` - DROP FOREIGN KEY `environment_of_workflow_ibfk_2`; - -ALTER TABLE `dataset_of_environment` - DROP FOREIGN KEY `dataset_of_environment_ibfk_1`; - -ALTER TABLE `dataset_of_environment` - DROP FOREIGN KEY `dataset_of_environment_ibfk_2`; - -ALTER TABLE `workflow_executions` - DROP FOREIGN KEY `workflow_executions_ibfk_3`; --- Dropping the dependent tables -DROP TABLE IF EXISTS `environment_of_workflow`; -DROP TABLE IF EXISTS `dataset_of_environment`; - --- Dropping the environment table -DROP TABLE IF EXISTS `environment`; - -ALTER TABLE `workflow_executions` - DROP COLUMN `environment_eid`; \ No newline at end of file diff --git a/core/scripts/sql/update/14.sql b/core/scripts/sql/update/14.sql deleted file mode 100644 index b15ae631c87..00000000000 --- a/core/scripts/sql/update/14.sql +++ /dev/null @@ -1,6 +0,0 @@ -use `texera_db`; - -DROP TABLE IF EXISTS `user_file_access`; -DROP TABLE IF EXISTS `file_of_project`; -DROP TABLE IF EXISTS `file_of_workflow`; -DROP TABLE IF EXISTS `file`; \ No newline at end of file diff --git a/core/scripts/sql/update/15.sql b/core/scripts/sql/update/15.sql deleted file mode 100644 index 83108ef9ec7..00000000000 --- a/core/scripts/sql/update/15.sql +++ /dev/null @@ -1,4 +0,0 @@ -USE `texera_db`; - -ALTER TABLE workflow -ADD is_published BOOLEAN NOT NULL DEFAULT false; \ No newline at end of file diff --git a/core/scripts/sql/update/16.sql b/core/scripts/sql/update/16.sql deleted file mode 100644 index d98bab753be..00000000000 --- a/core/scripts/sql/update/16.sql +++ /dev/null @@ -1,26 +0,0 @@ -USE texera_db; -CREATE TABLE IF NOT EXISTS workflow_user_likes -( - `uid` INT UNSIGNED NOT NULL, - `wid` INT UNSIGNED NOT NULL, - PRIMARY KEY (`uid`, `wid`), - FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON DELETE CASCADE, - FOREIGN KEY (`wid`) REFERENCES `workflow` (`wid`) ON DELETE CASCADE - ) ENGINE = INNODB; - -CREATE TABLE IF NOT EXISTS workflow_user_clones -( - `uid` INT UNSIGNED NOT NULL, - `wid` INT UNSIGNED NOT NULL, - PRIMARY KEY (`uid`, `wid`), - FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON DELETE CASCADE, - FOREIGN KEY (`wid`) REFERENCES `workflow` (`wid`) ON DELETE CASCADE - ) ENGINE = INNODB; - -CREATE TABLE IF NOT EXISTS workflow_user_activity ( - `uid` INT UNSIGNED NOT NULL DEFAULT 0, - `wid` INT UNSIGNED NOT NULL, - `ip` VARCHAR(15) DEFAULT NULL, - `activate` VARCHAR(10) NOT NULL, - `activity_time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP -) ENGINE = INNODB; diff --git a/core/scripts/sql/update/17.sql b/core/scripts/sql/update/17.sql deleted file mode 100644 index 3150321435b..00000000000 --- a/core/scripts/sql/update/17.sql +++ /dev/null @@ -1,8 +0,0 @@ -USE texera_db; -CREATE TABLE IF NOT EXISTS workflow_view_count -( - `wid` INT UNSIGNED NOT NULL, - `view_count` INT UNSIGNED NOT NULL DEFAULT 0, - PRIMARY KEY (`wid`), - FOREIGN KEY (`wid`) REFERENCES `workflow` (`wid`) ON DELETE CASCADE - ) ENGINE = INNODB; \ No newline at end of file diff --git a/core/scripts/sql/update/18.sql b/core/scripts/sql/update/18.sql deleted file mode 100644 index 4e3931fe8a7..00000000000 --- a/core/scripts/sql/update/18.sql +++ /dev/null @@ -1,7 +0,0 @@ -USE texera_db; - -ALTER TABLE dataset -MODIFY COLUMN is_public BOOLEAN NOT NULL DEFAULT true; - -ALTER TABLE workflow -CHANGE COLUMN is_published is_public BOOLEAN NOT NULL DEFAULT false; \ No newline at end of file diff --git a/core/scripts/sql/update/19.sql b/core/scripts/sql/update/19.sql deleted file mode 100644 index dafbbbd42d8..00000000000 --- a/core/scripts/sql/update/19.sql +++ /dev/null @@ -1,55 +0,0 @@ -USE texera_db; -DROP TABLE IF EXISTS operator_runtime_statistics; -DROP TABLE IF EXISTS operator_executions; - -CREATE TABLE IF NOT EXISTS operator_executions ( - operator_execution_id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY, - workflow_execution_id INT UNSIGNED NOT NULL, - operator_id VARCHAR(100) NOT NULL, - UNIQUE (workflow_execution_id, operator_id), - FOREIGN KEY (workflow_execution_id) REFERENCES workflow_executions (eid) ON DELETE CASCADE -); - -CREATE TABLE IF NOT EXISTS operator_runtime_statistics ( - operator_execution_id BIGINT UNSIGNED NOT NULL, - time TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), - input_tuple_cnt BIGINT UNSIGNED NOT NULL DEFAULT 0, - output_tuple_cnt BIGINT UNSIGNED NOT NULL DEFAULT 0, - status TINYINT NOT NULL DEFAULT 1, - data_processing_time BIGINT UNSIGNED NOT NULL DEFAULT 0, - control_processing_time BIGINT UNSIGNED NOT NULL DEFAULT 0, - idle_time BIGINT UNSIGNED NOT NULL DEFAULT 0, - num_workers INT UNSIGNED NOT NULL DEFAULT 0, - PRIMARY KEY (operator_execution_id, time), - FOREIGN KEY (operator_execution_id) REFERENCES operator_executions (operator_execution_id) ON DELETE CASCADE -); - -INSERT IGNORE INTO operator_executions (workflow_execution_id, operator_id) -SELECT DISTINCT execution_id, operator_id -FROM workflow_runtime_statistics; - -INSERT INTO operator_runtime_statistics ( - operator_execution_id, - time, - input_tuple_cnt, - output_tuple_cnt, - status, - data_processing_time, - control_processing_time, - idle_time, - num_workers -) -SELECT - oe.operator_execution_id, - wrs.time, - wrs.input_tuple_cnt, - wrs.output_tuple_cnt, - wrs.status, - wrs.data_processing_time, - wrs.control_processing_time, - wrs.idle_time, - wrs.num_workers -FROM workflow_runtime_statistics wrs -JOIN operator_executions oe ON wrs.execution_id = oe.workflow_execution_id AND wrs.operator_id = oe.operator_id; - -drop table if exists workflow_runtime_statistics; diff --git a/core/scripts/sql/update/20.sql b/core/scripts/sql/update/20.sql deleted file mode 100644 index 0dacefeeddc..00000000000 --- a/core/scripts/sql/update/20.sql +++ /dev/null @@ -1,12 +0,0 @@ -USE texera_db; - -DROP TABLE IF EXISTS workflow_user_activity; - -CREATE TABLE IF NOT EXISTS user_activity ( - `uid` INT UNSIGNED NOT NULL DEFAULT 0, - `id` INT UNSIGNED NOT NULL, - `type` VARCHAR(15) NOT NULL, - `ip` VARCHAR(15) DEFAULT NULL, - `activate` VARCHAR(10) NOT NULL, - `activity_time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP - ) ENGINE = INNODB; diff --git a/core/scripts/sql/update/21.sql b/core/scripts/sql/update/21.sql deleted file mode 100644 index d2e408f64ea..00000000000 --- a/core/scripts/sql/update/21.sql +++ /dev/null @@ -1,16 +0,0 @@ -use texera_db; - -drop table if exists operator_runtime_statistics; - -alter table workflow_executions add column runtime_stats_uri text default null; -alter table operator_executions drop column operator_execution_id, add column console_messages_uri text default null; - -CREATE TABLE IF NOT EXISTS operator_port_executions -( - workflow_execution_id INT UNSIGNED NOT NULL, - operator_id VARCHAR(100) NOT NULL, - port_id INT NOT NULL, - result_uri TEXT DEFAULT NULL, - UNIQUE (workflow_execution_id, operator_id, port_id), - FOREIGN KEY (workflow_execution_id) REFERENCES workflow_executions (eid) ON DELETE CASCADE -); diff --git a/core/scripts/sql/update/22.sql b/core/scripts/sql/update/22.sql deleted file mode 100644 index bda70bc7001..00000000000 --- a/core/scripts/sql/update/22.sql +++ /dev/null @@ -1,20 +0,0 @@ -USE texera_db; - -DROP TABLE IF EXISTS dataset_user_likes; -DROP TABLE IF EXISTS dataset_view_count; - -CREATE TABLE IF NOT EXISTS dataset_user_likes -( - `uid` INT UNSIGNED NOT NULL, - `did` INT UNSIGNED NOT NULL, - PRIMARY KEY (`uid`, `did`), - FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON DELETE CASCADE, - FOREIGN KEY (`did`) REFERENCES `dataset` (`did`) ON DELETE CASCADE - ) ENGINE = INNODB; - -CREATE TABLE IF NOT EXISTS `dataset_view_count` ( - `did` INT UNSIGNED NOT NULL, - `view_count` INT UNSIGNED NOT NULL DEFAULT 0, - PRIMARY KEY (`did`), - FOREIGN KEY (`did`) REFERENCES `dataset` (`did`) ON DELETE CASCADE - ) ENGINE = INNODB; \ No newline at end of file diff --git a/core/scripts/sql/update/fix_groupby.sql b/core/scripts/sql/update/fix_groupby.sql deleted file mode 100644 index c813f9d0acc..00000000000 --- a/core/scripts/sql/update/fix_groupby.sql +++ /dev/null @@ -1 +0,0 @@ -SET PERSIST sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY','')); \ No newline at end of file diff --git a/core/workflow-compiling-service/src/main/scala/edu/uci/ics/texera/service/WorkflowCompilingService.scala b/core/workflow-compiling-service/src/main/scala/edu/uci/ics/texera/service/WorkflowCompilingService.scala index fb3d98223ca..c217bfef344 100644 --- a/core/workflow-compiling-service/src/main/scala/edu/uci/ics/texera/service/WorkflowCompilingService.scala +++ b/core/workflow-compiling-service/src/main/scala/edu/uci/ics/texera/service/WorkflowCompilingService.scala @@ -3,7 +3,9 @@ package edu.uci.ics.texera.service import io.dropwizard.core.Application import io.dropwizard.core.setup.{Bootstrap, Environment} import com.fasterxml.jackson.module.scala.DefaultScalaModule +import edu.uci.ics.amber.core.storage.StorageConfig import edu.uci.ics.amber.util.PathUtils.workflowCompilingServicePath +import edu.uci.ics.texera.dao.SqlServer import edu.uci.ics.texera.service.resource.WorkflowCompilationResource class WorkflowCompilingService extends Application[WorkflowCompilingServiceConfiguration] { @@ -18,6 +20,13 @@ class WorkflowCompilingService extends Application[WorkflowCompilingServiceConfi ): Unit = { // serve backend at /api environment.jersey.setUrlPattern("/api/*") + + SqlServer.initConnection( + StorageConfig.jdbcUrl, + StorageConfig.jdbcUsername, + StorageConfig.jdbcPassword + ) + // register the compilation endpoint environment.jersey.register(classOf[WorkflowCompilationResource]) } diff --git a/core/workflow-core/src/main/resources/storage-config.yaml b/core/workflow-core/src/main/resources/storage-config.yaml index 3c12ca9d7cd..08d1ba6edf5 100644 --- a/core/workflow-core/src/main/resources/storage-config.yaml +++ b/core/workflow-core/src/main/resources/storage-config.yaml @@ -27,6 +27,6 @@ storage: min-wait-ms: 100 # 0.1s max-wait-ms: 10000 # 10s jdbc: - url: "jdbc:mysql://localhost:3306/texera_db?serverTimezone=UTC" - username: "" + url: "jdbc:postgresql://localhost:5432/texera_db" + username: "postgres" password: "" diff --git a/core/workflow-core/src/main/scala/edu/uci/ics/amber/core/storage/FileResolver.scala b/core/workflow-core/src/main/scala/edu/uci/ics/amber/core/storage/FileResolver.scala index 051a07c1050..18a5acd0c60 100644 --- a/core/workflow-core/src/main/scala/edu/uci/ics/amber/core/storage/FileResolver.scala +++ b/core/workflow-core/src/main/scala/edu/uci/ics/amber/core/storage/FileResolver.scala @@ -82,11 +82,7 @@ object FileResolver { val (dataset, datasetVersion) = withTransaction( SqlServer - .getInstance( - StorageConfig.jdbcUrl, - StorageConfig.jdbcUsername, - StorageConfig.jdbcPassword - ) + .getInstance() .createDSLContext() ) { ctx => // fetch the dataset from DB diff --git a/core/workflow-core/src/main/scala/edu/uci/ics/amber/core/storage/model/DatasetFileDocument.scala b/core/workflow-core/src/main/scala/edu/uci/ics/amber/core/storage/model/DatasetFileDocument.scala index d050915cc7c..0f65191e08b 100644 --- a/core/workflow-core/src/main/scala/edu/uci/ics/amber/core/storage/model/DatasetFileDocument.scala +++ b/core/workflow-core/src/main/scala/edu/uci/ics/amber/core/storage/model/DatasetFileDocument.scala @@ -2,7 +2,6 @@ package edu.uci.ics.amber.core.storage.model import edu.uci.ics.amber.core.storage.util.dataset.GitVersionControlLocalFileStorage import edu.uci.ics.amber.util.PathUtils -import org.jooq.types.UInteger import java.io.{File, FileOutputStream, InputStream} import java.net.{URI, URLDecoder} @@ -34,7 +33,7 @@ private[storage] class DatasetFileDocument(uri: URI) extends VirtualDocument[Not override def getURI: URI = uri override def asInputStream(): InputStream = { - val datasetAbsolutePath = PathUtils.getDatasetPath(UInteger.valueOf(did)) + val datasetAbsolutePath = PathUtils.getDatasetPath(Integer.valueOf(did)) GitVersionControlLocalFileStorage .retrieveFileContentOfVersionAsInputStream( datasetAbsolutePath, @@ -76,8 +75,8 @@ private[storage] class DatasetFileDocument(uri: URI) extends VirtualDocument[Not } // then remove the dataset file GitVersionControlLocalFileStorage.removeFileFromRepo( - PathUtils.getDatasetPath(UInteger.valueOf(did)), - PathUtils.getDatasetPath(UInteger.valueOf(did)).resolve(fileRelativePath) + PathUtils.getDatasetPath(Integer.valueOf(did)), + PathUtils.getDatasetPath(Integer.valueOf(did)).resolve(fileRelativePath) ) } } diff --git a/core/workflow-core/src/main/scala/edu/uci/ics/amber/util/PathUtils.scala b/core/workflow-core/src/main/scala/edu/uci/ics/amber/util/PathUtils.scala index 7fe89d0e8ce..f88f29d0b30 100644 --- a/core/workflow-core/src/main/scala/edu/uci/ics/amber/util/PathUtils.scala +++ b/core/workflow-core/src/main/scala/edu/uci/ics/amber/util/PathUtils.scala @@ -1,7 +1,5 @@ package edu.uci.ics.amber.util -import org.jooq.types.UInteger - import java.nio.file.{Files, Path, Paths} import scala.jdk.CollectionConverters.IteratorHasAsScala @@ -42,7 +40,7 @@ object PathUtils { private lazy val datasetsRootPath = corePath.resolve("amber").resolve("user-resources").resolve("datasets") - def getDatasetPath(did: UInteger): Path = { + def getDatasetPath(did: Integer): Path = { datasetsRootPath.resolve(did.toString) } diff --git a/core/workflow-core/src/test/scala/edu/uci/ics/amber/storage/FileResolverSpec.scala b/core/workflow-core/src/test/scala/edu/uci/ics/amber/storage/FileResolverSpec.scala index 6549dec7739..54c833fa6af 100644 --- a/core/workflow-core/src/test/scala/edu/uci/ics/amber/storage/FileResolverSpec.scala +++ b/core/workflow-core/src/test/scala/edu/uci/ics/amber/storage/FileResolverSpec.scala @@ -2,11 +2,10 @@ package edu.uci.ics.amber.storage import edu.uci.ics.amber.core.storage.FileResolver import edu.uci.ics.texera.dao.MockTexeraDB -import edu.uci.ics.texera.dao.jooq.generated.enums.UserRole +import edu.uci.ics.texera.dao.jooq.generated.enums.UserRoleEnum import edu.uci.ics.texera.dao.jooq.generated.tables.daos.{DatasetDao, DatasetVersionDao, UserDao} import edu.uci.ics.texera.dao.jooq.generated.tables.pojos.{Dataset, DatasetVersion, User} import org.apache.commons.vfs2.FileNotFoundException -import org.jooq.types.UInteger import org.scalatest.{BeforeAndAfterAll, BeforeAndAfterEach} import org.scalatest.flatspec.AnyFlatSpec @@ -20,9 +19,9 @@ class FileResolverSpec private val testUser: User = { val user = new User - user.setUid(UInteger.valueOf(1)) + user.setUid(Integer.valueOf(1)) user.setName("test_user") - user.setRole(UserRole.ADMIN) + user.setRole(UserRoleEnum.ADMIN) user.setPassword("123") user.setEmail("test_user@test.com") user @@ -30,30 +29,30 @@ class FileResolverSpec private val testDataset: Dataset = { val dataset = new Dataset - dataset.setDid(UInteger.valueOf(1)) + dataset.setDid(Integer.valueOf(1)) dataset.setName("test_dataset") dataset.setDescription("dataset for test") - dataset.setIsPublic(1.toByte) - dataset.setOwnerUid(UInteger.valueOf(1)) + dataset.setIsPublic(true) + dataset.setOwnerUid(Integer.valueOf(1)) dataset } private val testDatasetVersion1: DatasetVersion = { val datasetVersion = new DatasetVersion - datasetVersion.setDid(UInteger.valueOf(1)) + datasetVersion.setDid(Integer.valueOf(1)) datasetVersion.setName("v1") - datasetVersion.setDvid(UInteger.valueOf(1)) - datasetVersion.setCreatorUid(UInteger.valueOf(1)) + datasetVersion.setDvid(Integer.valueOf(1)) + datasetVersion.setCreatorUid(Integer.valueOf(1)) datasetVersion.setVersionHash("97fd4c2a755b69b7c66d322eab40b7e5c2ad5d10") datasetVersion } private val testDatasetVersion2: DatasetVersion = { val datasetVersion = new DatasetVersion - datasetVersion.setDid(UInteger.valueOf(1)) + datasetVersion.setDid(Integer.valueOf(1)) datasetVersion.setName("v2") - datasetVersion.setDvid(UInteger.valueOf(2)) - datasetVersion.setCreatorUid(UInteger.valueOf(1)) + datasetVersion.setDvid(Integer.valueOf(2)) + datasetVersion.setCreatorUid(Integer.valueOf(1)) datasetVersion.setVersionHash("37966c92cb3a8bee1f9d8e21937aa8faa5e48513") datasetVersion }