本文整理汇总了Java中net.java.ao.EntityManager类的典型用法代码示例。如果您正苦于以下问题:Java EntityManager类的具体用法?Java EntityManager怎么用?Java EntityManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EntityManager类属于net.java.ao包,在下文中一共展示了EntityManager类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: update
import net.java.ao.EntityManager; //导入依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public void update(EntityManager entityManager) throws Exception {
entityManager.migrate(WebHookConfiguration.class);
entityManager.create(WebHookConfiguration.class, ImmutableMap.<String, Object>builder()
.put(COLUMN_ENABLED, true)
.put(COLUMN_REPO_ID, 1)
.put(COLUMN_TITLE, "Jenkins")
.put(COLUMN_URL, "https://example.com/jenkins/webhook")
.build());
entityManager.create(WebHookConfiguration.class, ImmutableMap.<String, Object>builder()
.put(COLUMN_ENABLED, true)
.put(COLUMN_REPO_ID, 2)
.put(COLUMN_TITLE, "HipChat")
.put(COLUMN_URL, "https://example.com/hipchat/webhook")
.build());
entityManager.create(WebHookConfiguration.class, ImmutableMap.<String, Object>builder()
.put(COLUMN_ENABLED, false)
.put(COLUMN_REPO_ID, 2)
.put(COLUMN_TITLE, "Slack")
.put(COLUMN_URL, "https://example.com/slack/webhook")
.build());
}
开发者ID:Eernie,项目名称:bitbucket-webhooks-plugin,代码行数:26,代码来源:WebHookConfigurationDatabaseUpdater.java
示例2: update
import net.java.ao.EntityManager; //导入依赖的package包/类
@Override
public void update(EntityManager em) throws Exception {
em.migrate(SshKeyEntity.class);
// create an expired and non-expired ID.
// Also create a BYPASS ID so that all types are present
// IMPORTANT - only use APPROVED_PUBLIC_KEY to make sure validation rules dont allow UNAPPROVED key in test sabove
DateTime now = new DateTime();
expiredKey = em.create(SshKeyEntity.class, new DBParam("USERID", EXPIRED_USER_ID), new DBParam("KEYID",
EXPIRED_STASH_KEY_ID), new DBParam("TEXT", APPROVED_PUBLIC_KEY_ONE), new DBParam("LABEL", "COMPROMISED"), new DBParam("TYPE", KeyType.USER),
new DBParam("CREATED", now.minusDays(DAYS_ALLOWED+1).toDate()));
validKey = em.create(SshKeyEntity.class, new DBParam("USERID", VALID_USER_ID), new DBParam("KEYID",
VALID_STASH_KEY_ID), new DBParam("TEXT", APPROVED_PUBLIC_KEY_ONE), new DBParam("LABEL", "VALID"), new DBParam("TYPE", KeyType.USER),
new DBParam("CREATED", now.minusDays(DAYS_ALLOWED-1).toDate()));
SshKeyEntity bypassKey = em.create(SshKeyEntity.class, new DBParam("USERID", VALID_USER_ID), new DBParam("KEYID",
VALID_BYPASS_KEY_ID), new DBParam("TEXT", APPROVED_PUBLIC_KEY_ONE), new DBParam("LABEL", "BYPASS"), new DBParam("TYPE", KeyType.BYPASS),
new DBParam("CREATED", now.minusDays(DAYS_ALLOWED-1).toDate()));
}
开发者ID:libertymutual,项目名称:ssh-key-enforcer-stash,代码行数:23,代码来源:EnterpriseSshKeyManagerImplTest.java
示例3: update
import net.java.ao.EntityManager; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void update(EntityManager entityManager) throws Exception {
entityManager.migrate(JenkinsServerConfiguration.class,
RepositoryConfiguration.class, PullRequestMetadata.class, JobTypeStatusMapping.class);
RepositoryConfiguration rc = entityManager.create(
RepositoryConfiguration.class, new DBParam("REPO_ID",
new Integer(10)));
rc.setCiEnabled(true);
rc.setPublishBranchRegex("publishBranchRegex");
rc.setPublishBuildCommand("publishBuildCommand");
rc.setVerifyBranchRegex("verifyBranchRegex");
rc.setVerifyBuildCommand("verifyBuildCommand");
rc.save();
}
开发者ID:palantir,项目名称:stashbot,代码行数:18,代码来源:ConfigurationTest.java
示例4: update
import net.java.ao.EntityManager; //导入依赖的package包/类
@Override
public void update(EntityManager em) throws Exception {
em.migrate(SshKeyEntity.class);
DateTime now = new DateTime();
// create a pre-expired user key in DB
expiredUserKey = em.create(SshKeyEntity.class, new DBParam("TYPE", KeyType.USER), new DBParam("USERID",
ADMIN_ID), new DBParam("TEXT", PUBLIC_KEY_ONE), new DBParam("LABEL", "COMPROMISED"), new DBParam(
"CREATED", now.minusDays(DAYS_ALLOWED_FOR_USERS + 1).toDate()));
// create a pre-expired bamboo key
expiredBambooKey = em.create(SshKeyEntity.class, new DBParam("USERID", ADMIN_ID), new DBParam("TEXT",
PUBLIC_KEY_ONE), new DBParam("LABEL", "BAMBOO"), new DBParam("TYPE", KeyType.BAMBOO), new DBParam(
"CREATED", now.minusDays(DAYS_ALLOWED_FOR_BAMBOO + 1).toDate()));
// create a non-expired user key in DB
validUserKey = em.create(SshKeyEntity.class, new DBParam("TYPE", KeyType.USER), new DBParam("USERID",
USER_ID), new DBParam("TEXT", PUBLIC_KEY_ONE), new DBParam("LABEL", "COMPROMISED"), new DBParam(
"CREATED", now.minusDays(DAYS_ALLOWED_FOR_USERS - 1).toDate()));
// create a babmoo key that is older then user limit, but valid to bamboo limit
validBambooKey = em.create(SshKeyEntity.class, new DBParam("USERID", USER_ID), new DBParam("TEXT",
PUBLIC_KEY_ONE), new DBParam("LABEL", "BAMBOO"), new DBParam("TYPE", KeyType.BAMBOO), new DBParam(
"CREATED", now.minusDays(DAYS_ALLOWED_FOR_BAMBOO - 1).toDate()));
}
开发者ID:libertymutual,项目名称:ssh-key-enforcer-stash,代码行数:28,代码来源:EnterpriseSshKeyRepositoryTest.java
示例5: update
import net.java.ao.EntityManager; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void update(EntityManager entityManager) throws Exception {
// create some repo config
entityManager.migrate(RepositoryConfiguration.class);
RepositoryConfiguration rc = entityManager.create(
RepositoryConfiguration.class, new DBParam("REPO_ID",
new Integer(10)));
rc.setCiEnabled(true);
rc.setPublishBranchRegex("publishBranchRegex");
rc.setPublishBuildCommand("publishBuildCommand");
rc.setVerifyBranchRegex("verifyBranchRegex");
rc.setVerifyBuildCommand("verifyBuildCommand");
rc.save();
RepositoryConfiguration rc2 = entityManager.create(
RepositoryConfiguration.class, new DBParam("REPO_ID",
new Integer(11)));
rc2.setCiEnabled(false);
rc2.setPublishBranchRegex("publishBranchRegex");
rc2.setPublishBuildCommand("publishBuildCommand");
rc2.setVerifyBranchRegex("verifyBranchRegex");
rc2.setVerifyBuildCommand("verifyBuildCommand");
rc2.save();
}
开发者ID:palantir,项目名称:stashbot,代码行数:28,代码来源:ConfigurationUpgradeV2Test.java
示例6: getEntityManager
import net.java.ao.EntityManager; //导入依赖的package包/类
@Override
public EntityManager getEntityManager()
{
throw new IllegalArgumentException("Method not implemented");
}
开发者ID:Eernie,项目名称:bitbucket-webhooks-plugin,代码行数:6,代码来源:DummyWebHookConfiguration.java
示例7: BranchAOPopulator
import net.java.ao.EntityManager; //导入依赖的package包/类
public BranchAOPopulator(final EntityManager entityManager)
{
super(entityManager);
}
开发者ID:edgehosting,项目名称:jira-dvcs-connector,代码行数:5,代码来源:BranchAOPopulator.java
示例8: ChangesetAOPopulator
import net.java.ao.EntityManager; //导入依赖的package包/类
public ChangesetAOPopulator(final EntityManager entityManager)
{
super(entityManager);
}
开发者ID:edgehosting,项目名称:jira-dvcs-connector,代码行数:5,代码来源:ChangesetAOPopulator.java
示例9: AOPopulator
import net.java.ao.EntityManager; //导入依赖的package包/类
public AOPopulator(final EntityManager entityManager)
{
this.entityManager = entityManager;
}
开发者ID:edgehosting,项目名称:jira-dvcs-connector,代码行数:5,代码来源:AOPopulator.java
示例10: RepositoryAOPopulator
import net.java.ao.EntityManager; //导入依赖的package包/类
public RepositoryAOPopulator(final EntityManager entityManager)
{
super(entityManager);
}
开发者ID:edgehosting,项目名称:jira-dvcs-connector,代码行数:5,代码来源:RepositoryAOPopulator.java
示例11: TestConnectionProvider
import net.java.ao.EntityManager; //导入依赖的package包/类
public TestConnectionProvider(final EntityManager entityManager)
{
this.entityManager = entityManager;
}
开发者ID:edgehosting,项目名称:jira-dvcs-connector,代码行数:5,代码来源:TestConnectionProvider.java
示例12: PullRequestAOPopulator
import net.java.ao.EntityManager; //导入依赖的package包/类
public PullRequestAOPopulator(final EntityManager entityManager)
{
super(entityManager);
}
开发者ID:edgehosting,项目名称:jira-dvcs-connector,代码行数:5,代码来源:PullRequestAOPopulator.java
示例13: OrganizationAOPopulator
import net.java.ao.EntityManager; //导入依赖的package包/类
public OrganizationAOPopulator(final EntityManager entityManager)
{
super(entityManager);
}
开发者ID:edgehosting,项目名称:jira-dvcs-connector,代码行数:5,代码来源:OrganizationAOPopulator.java
示例14: getEntityManager
import net.java.ao.EntityManager; //导入依赖的package包/类
@Override
public EntityManager getEntityManager()
{
return null;
}
开发者ID:edgehosting,项目名称:jira-dvcs-connector,代码行数:6,代码来源:RepositoryPullRequestMappingMock.java
示例15: update
import net.java.ao.EntityManager; //导入依赖的package包/类
@Override
public void update(EntityManager entityManager) throws Exception {
entityManager.migrate(UserAO.class, RoleAO.class, RoleToPermissionAO.class, PermissionAO.class, ForumAO.class, ThreadAO.class, AttachmentAO.class, PostAO.class, StateAO.class);
}
开发者ID:confluence-fourum,项目名称:Fourum-Plugin,代码行数:5,代码来源:AOTestDatabaseUpdater.java
示例16: update
import net.java.ao.EntityManager; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void update(EntityManager entityManager) throws Exception {
entityManager.migrate(DisapprovalConfiguration.class, PullRequestDisapproval.class);
}
开发者ID:palantir,项目名称:stash-disapproval-plugin,代码行数:6,代码来源:PersistenceManagerTest.java
示例17: update
import net.java.ao.EntityManager; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void update(EntityManager entityManager) throws Exception {
entityManager.migrate(JobTemplate.class, JobMapping.class,
RepositoryConfiguration.class, JobTypeStatusMapping.class);
}
开发者ID:palantir,项目名称:stashbot,代码行数:7,代码来源:JenkinsJobTest.java
注:本文中的net.java.ao.EntityManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论