<version>2.2</version>\r
<executions>\r
<execution>\r
+ <phase>process-test-resources</phase>\r
<goals>\r
<goal>hbm2ddl</goal>\r
</goals>\r
<artifactId>maven-antrun-plugin</artifactId>\r
<executions>\r
<execution>\r
+ <phase>process-test-resources</phase>\r
<configuration>\r
<tasks>\r
<copy file="${basedir}/target/hibernate3/sql/${sql.file}" tofile="${sql.dir}/${sql.file}"/>\r
drop table if exists accounts_common;
-create table accounts_common (csid varchar(255) not null, anchor_name varchar(128) not null, email longtext not null, first_name longtext not null, last_name longtext not null, mi varchar(1), mobile varchar(15), phone varchar(15), primary key (csid));
+create table accounts_common (csid varchar(255) not null, email longtext not null, first_name longtext not null, last_name longtext not null, mi varchar(1), mobile varchar(15), phone varchar(15), screen_name varchar(128) not null, primary key (csid));
for (AccountsCommonList.AccountListItem item : items) {
logger.debug(testName + ": list-item[" + i + "] csid=" +
item.getCsid());
- logger.debug(testName + ": list-item[" + i + "] anchorName=" +
- item.getAnchorName());
+ logger.debug(testName + ": list-item[" + i + "] screenName=" +
+ item.getScreenName());
logger.debug(testName + ": list-item[" + i + "] URI=" +
item.getUri());
i++;
// ---------------------------------------------------------------
// Utility methods used by tests above
// ---------------------------------------------------------------
- private AccountsCommon createAccountInstance(String firstName, String lastName, String anchorName,
+ private AccountsCommon createAccountInstance(String firstName, String lastName, String screenName,
String passwd, String email) {
AccountsCommon account = new AccountsCommon();
account.setFirstName(firstName);
account.setLastName(lastName);
- account.setAnchorName(anchorName);
- account.setUserName(anchorName);
+ account.setScreenName(screenName);
+ account.setUserName(screenName);
byte[] b64passwd = Base64.encodeBase64(passwd.getBytes());
account.setPassword(b64passwd);
account.setEmail(email);
@Test(dataProvider = "testName", dataProviderClass = AccountTest.class)
public void create(String testName) throws Exception {
AccountsCommon account = new AccountsCommon();
- account.setAnchorName("john");
+ account.setScreenName("john");
account.setFirstName("John");
account.setLastName("Doe");
account.setEmail("john.doe@berkeley.edu");
}
}
- private AccountsCommon findAccount(String anchorName) throws Exception {
- Query q = em.createQuery("select a from org.collectionspace.services.account.AccountsCommon a where a.anchorName = :anchorname");
- q.setParameter("anchorname", anchorName);
+ private AccountsCommon findAccount(String screenName) throws Exception {
+ Query q = em.createQuery("select a from org.collectionspace.services.account.AccountsCommon a where a.screenName = :screenname");
+ q.setParameter("screenname", screenName);
return (AccountsCommon) q.getSingleResult();
}
</xs:appinfo>
</xs:annotation>
<xs:sequence>
- <xs:element name="anchorName" type="xs:string" minOccurs="1" maxOccurs="1">
+ <xs:element name="screenName" type="xs:string" minOccurs="1" maxOccurs="1">
<xs:annotation>
<xs:appinfo>
<hj:basic>
- <orm:column name="anchor_name" length="128" nullable="false"/>
+ <orm:column name="screen_name" length="128" nullable="false"/>
</hj:basic>
</xs:appinfo>
</xs:annotation>
</xs:appinfo>
</xs:annotation>
<xs:sequence>
- <xs:element name="anchorName" type="xs:string" minOccurs="1"/>
+ <xs:element name="screenName" type="xs:string" minOccurs="1"/>
<xs:element name="firstName" type="xs:string" minOccurs="1" />
<xs:element name="lastName" type="xs:string" minOccurs="1" />
<xs:element name="mi" type="xs:string"/>
for (Object obj : wrapDoc.getWrappedObject()) {
AccountsCommon account = (AccountsCommon) obj;
AccountListItem accListItem = new AccountListItem();
- accListItem.setAnchorName(account.getAnchorName());
+ accListItem.setScreenName(account.getScreenName());
accListItem.setEmail(account.getEmail());
accListItem.setFirstName(account.getFirstName());
accListItem.setLastName(account.getLastName());