You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by ag...@apache.org on 2007/05/30 00:47:24 UTC
svn commit: r542688 [2/6] - in /roller/trunk: src/META-INF/
src/org/apache/roller/business/ src/org/apache/roller/business/hibernate/
src/org/apache/roller/business/jpa/ src/org/apache/roller/business/pings/
src/org/apache/roller/business/runnable/ src...
Modified: roller/trunk/src/org/apache/roller/business/jpa/JPAUserManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/business/jpa/JPAUserManagerImpl.java?view=diff&rev=542688&r1=542687&r2=542688
==============================================================================
--- roller/trunk/src/org/apache/roller/business/jpa/JPAUserManagerImpl.java (original)
+++ roller/trunk/src/org/apache/roller/business/jpa/JPAUserManagerImpl.java Tue May 29 15:47:17 2007
@@ -103,12 +103,12 @@
WeblogManager wmgr = RollerFactory.getRoller().getWeblogManager();
// remove tags
- Query tagQuery = strategy.getNamedQuery("WeblogEntryTagData.getByWeblog");
+ Query tagQuery = strategy.getNamedQuery("WeblogEntryTag.getByWeblog");
tagQuery.setParameter(1, website);
List results = tagQuery.getResultList();
for(Iterator iter = results.iterator(); iter.hasNext();) {
- WeblogEntryTagData tagData = (WeblogEntryTagData) iter.next();
+ WeblogEntryTag tagData = (WeblogEntryTag) iter.next();
this.strategy.remove(tagData);
}
@@ -118,13 +118,13 @@
// delete all weblog tag aggregates
Query removeAggs= strategy.getNamedUpdate(
- "WeblogEntryTagAggregateData.removeByWeblog");
+ "WeblogEntryTagAggregate.removeByWeblog");
removeAggs.setParameter(1, website);
removeAggs.executeUpdate();
// delete all bad counts
Query removeCounts = strategy.getNamedUpdate(
- "WeblogEntryTagAggregateData.removeByTotalLessEqual");
+ "WeblogEntryTagAggregate.removeByTotalLessEqual");
removeCounts.setParameter(1, new Integer(0));
removeCounts.executeUpdate();
@@ -182,16 +182,16 @@
this.strategy.flush();
// remove entries
- Query refQuery = strategy.getNamedQuery("WeblogEntryData.getByWebsite");
+ Query refQuery = strategy.getNamedQuery("WeblogEntry.getByWebsite");
refQuery.setParameter(1, website);
List entries = refQuery.getResultList();
for (Iterator iter = entries.iterator(); iter.hasNext();) {
- WeblogEntryData entry = (WeblogEntryData) iter.next();
+ WeblogEntry entry = (WeblogEntry) iter.next();
wmgr.removeWeblogEntry(entry);
}
// remove categories
- WeblogCategoryData rootCat = wmgr.getRootWeblogCategory(website);
+ WeblogCategory rootCat = wmgr.getRootWeblogCategory(website);
if (null != rootCat) {
this.strategy.remove(rootCat);
}
@@ -205,7 +205,7 @@
iterator.remove();
//Remove it from corresponding user
- UserData user = perms.getUser();
+ User user = perms.getUser();
user.getPermissions().remove(perms);
//Remove it from database
@@ -213,7 +213,7 @@
}
// flush the changes before returning. This is required as there is a
- // circular dependency between WeblogCategoryData and Weblog
+ // circular dependency between WeblogCategory and Weblog
this.strategy.flush();
}
@@ -221,20 +221,20 @@
for(Iterator iter = tags.iterator(); iter.hasNext();) {
TagStat stat = (TagStat) iter.next();
Query query = strategy.getNamedUpdate(
- "WeblogEntryTagAggregateData.getByName&WebsiteNullOrderByLastUsedDesc");
+ "WeblogEntryTagAggregate.getByName&WebsiteNullOrderByLastUsedDesc");
query.setParameter(1, stat.getName());
try {
- WeblogEntryTagAggregateData agg = (WeblogEntryTagAggregateData)query.getSingleResult();
+ WeblogEntryTagAggregate agg = (WeblogEntryTagAggregate)query.getSingleResult();
agg.setTotal(agg.getTotal() - stat.getCount());
} catch (NoResultException ignored) {} // no agg to be updated
}
}
- public void saveUser(UserData data) throws RollerException {
+ public void saveUser(User data) throws RollerException {
this.strategy.store(data);
}
- public void removeUser(UserData user) throws RollerException {
+ public void removeUser(User user) throws RollerException {
//remove permissions
// make sure that both sides of the relationship are maintained
for (Iterator iterator = user.getPermissions().iterator(); iterator.hasNext();) {
@@ -262,7 +262,7 @@
Weblog website = perms.getWebsite(); //(Weblog) getManagedObject(perms.getWebsite());
website.getPermissions().add(perms);
- UserData user = perms.getUser(); //(UserData) getManagedObject(perms.getUser());
+ User user = perms.getUser(); //(User) getManagedObject(perms.getUser());
user.getPermissions().add(perms);
}
this.strategy.store(perms);
@@ -276,7 +276,7 @@
Weblog website = perms.getWebsite(); //Weblog) getManagedObject(perms.getWebsite());
website.getPermissions().remove(perms);
- UserData user = perms.getUser(); //(UserData) getManagedObject(perms.getUser());
+ User user = perms.getUser(); //(User) getManagedObject(perms.getUser());
user.getPermissions().remove(perms);
}
@@ -298,7 +298,7 @@
RollerFactory.getRoller().getUserManager().saveWebsite(page.getWebsite());
}
- public void addUser(UserData newUser) throws RollerException {
+ public void addUser(User newUser) throws RollerException {
if(newUser == null)
throw new RollerException("cannot add null user");
@@ -348,7 +348,7 @@
savePermissions(perms);
// add default category
- WeblogCategoryData rootCat = new WeblogCategoryData(
+ WeblogCategory rootCat = new WeblogCategory(
newWeblog, // newWeblog
null, // parent
"root", // name
@@ -357,11 +357,11 @@
this.strategy.store(rootCat);
String cats = RollerConfig.getProperty("newuser.categories");
- WeblogCategoryData firstCat = rootCat;
+ WeblogCategory firstCat = rootCat;
if (cats != null && cats.trim().length() > 0) {
String[] splitcats = cats.split(",");
for (int i=0; i<splitcats.length; i++) {
- WeblogCategoryData c = new WeblogCategoryData(
+ WeblogCategory c = new WeblogCategory(
newWeblog, // newWeblog
rootCat, // parent
splitcats[i], // name
@@ -430,7 +430,7 @@
* TODO BACKEND: do we really need this? can't we just use storePermissions()?
*/
public WeblogPermission inviteUser(Weblog website,
- UserData user, short mask) throws RollerException {
+ User user, short mask) throws RollerException {
if (website == null) throw new RollerException("Website cannot be null");
if (user == null) throw new RollerException("User cannot be null");
@@ -449,7 +449,7 @@
*
* TODO: replace this with a domain model method like weblog.retireUser(user)
*/
- public void retireUser(Weblog website, UserData user) throws RollerException {
+ public void retireUser(Weblog website, User user) throws RollerException {
if (website == null) throw new RollerException("Website cannot be null");
if (user == null) throw new RollerException("User cannot be null");
@@ -469,7 +469,7 @@
this.strategy.remove(target);
}
- public void revokeRole(String roleName, UserData user) throws RollerException {
+ public void revokeRole(String roleName, User user) throws RollerException {
Collection roles = user.getRoles();
Iterator iter = roles.iterator();
while (iter.hasNext()) {
@@ -543,7 +543,7 @@
* Get websites of a user
*/
public List getWebsites(
- UserData user, Boolean enabled, Boolean active,
+ User user, Boolean enabled, Boolean active,
Date startDate, Date endDate, int offset, int length) throws RollerException {
//if (endDate == null) endDate = new Date();
@@ -610,15 +610,15 @@
return query.getResultList();
}
- public UserData getUser(String id) throws RollerException {
- return (UserData)this.strategy.load(UserData.class, id);
+ public User getUser(String id) throws RollerException {
+ return (User)this.strategy.load(User.class, id);
}
- public UserData getUserByUserName(String userName) throws RollerException {
+ public User getUserByUserName(String userName) throws RollerException {
return getUserByUserName(userName, Boolean.TRUE);
}
- public UserData getUserByUserName(String userName, Boolean enabled)
+ public User getUserByUserName(String userName, Boolean enabled)
throws RollerException {
if (userName==null )
@@ -628,7 +628,7 @@
// NOTE: if we ever allow changing usernames then this needs updating
if(this.userNameToIdMap.containsKey(userName)) {
- UserData user = this.getUser(
+ User user = this.getUser(
(String) this.userNameToIdMap.get(userName));
if(user != null) {
// only return the user if the enabled status matches
@@ -647,19 +647,19 @@
Object[] params;
if (enabled != null) {
query = strategy.getNamedQuery(
- "UserData.getByUserName&Enabled");
+ "User.getByUserName&Enabled");
params = new Object[] {userName, enabled};
} else {
query = strategy.getNamedQuery(
- "UserData.getByUserName");
+ "User.getByUserName");
params = new Object[] {userName};
}
for (int i=0; i<params.length; i++) {
query.setParameter(i+1, params[i]);
}
- UserData user = null;
+ User user = null;
try {
- user = (UserData)query.getSingleResult();
+ user = (User)query.getSingleResult();
} catch (NoResultException e) {
user = null;
}
@@ -690,11 +690,11 @@
StringBuffer whereClause = new StringBuffer();
if (weblog != null) {
- queryString.append("SELECT u FROM UserData u JOIN u.permissions p WHERE ");
+ queryString.append("SELECT u FROM User u JOIN u.permissions p WHERE ");
params.add(size++, weblog);
whereClause.append(" p.website = ?" + size);
} else {
- queryString.append("SELECT u FROM UserData u WHERE ");
+ queryString.append("SELECT u FROM User u WHERE ");
}
if (enabled != null) {
@@ -750,14 +750,14 @@
Timestamp start = new Timestamp(startDate.getTime());
Timestamp end = new Timestamp(endDate.getTime());
query = strategy.getNamedQuery(
- "UserData.getByEnabled&EndDate&StartDateOrderByStartDateDesc");
+ "User.getByEnabled&EndDate&StartDateOrderByStartDateDesc");
query.setParameter(1, enabled);
query.setParameter(2, end);
query.setParameter(3, start);
} else {
Timestamp end = new Timestamp(endDate.getTime());
query = strategy.getNamedQuery(
- "UserData.getByEnabled&EndDateOrderByStartDateDesc");
+ "User.getByEnabled&EndDateOrderByStartDateDesc");
query.setParameter(1, enabled);
query.setParameter(2, end);
}
@@ -766,13 +766,13 @@
Timestamp start = new Timestamp(startDate.getTime());
Timestamp end = new Timestamp(endDate.getTime());
query = strategy.getNamedQuery(
- "UserData.getByEndDate&StartDateOrderByStartDateDesc");
+ "User.getByEndDate&StartDateOrderByStartDateDesc");
query.setParameter(1, end);
query.setParameter(2, start);
} else {
Timestamp end = new Timestamp(endDate.getTime());
query = strategy.getNamedQuery(
- "UserData.getByEndDateOrderByStartDateDesc");
+ "User.getByEndDateOrderByStartDateDesc");
query.setParameter(1, end);
}
}
@@ -799,19 +799,19 @@
if (enabled != null) {
if (website != null) {
- query = strategy.getNamedQuery("UserData.getByEnabled&Permissions.website");
+ query = strategy.getNamedQuery("User.getByEnabled&Permissions.website");
query.setParameter(1, enabled);
query.setParameter(2, website);
} else {
- query = strategy.getNamedQuery("UserData.getByEnabled");
+ query = strategy.getNamedQuery("User.getByEnabled");
query.setParameter(1, enabled);
}
} else {
if (website != null) {
- query = strategy.getNamedQuery("UserData.getByPermissions.website");
+ query = strategy.getNamedQuery("User.getByPermissions.website");
query.setParameter(1, website);
} else {
- query = strategy.getNamedQuery("UserData.getAll");
+ query = strategy.getNamedQuery("User.getAll");
}
}
if (offset != 0) {
@@ -830,22 +830,22 @@
if (enabled != null) {
if (startsWith != null) {
query = strategy.getNamedQuery(
- "UserData.getByEnabled&UserNameOrEmailAddressStartsWith");
+ "User.getByEnabled&UserNameOrEmailAddressStartsWith");
query.setParameter(1, enabled);
query.setParameter(2, startsWith + '%');
query.setParameter(3, startsWith + '%');
} else {
query = strategy.getNamedQuery(
- "UserData.getByEnabled");
+ "User.getByEnabled");
query.setParameter(1, enabled);
}
} else {
if (startsWith != null) {
query = strategy.getNamedQuery(
- "UserData.getByUserNameOrEmailAddressStartsWith");
+ "User.getByUserNameOrEmailAddressStartsWith");
query.setParameter(1, startsWith + '%');
} else {
- query = strategy.getNamedQuery("UserData.getAll");
+ query = strategy.getNamedQuery("User.getAll");
}
}
if (offset != 0) {
@@ -953,7 +953,7 @@
* Return permissions for specified user in website
*/
public WeblogPermission getPermissions(
- Weblog website, UserData user) throws RollerException {
+ Weblog website, User user) throws RollerException {
Query q = strategy.getNamedQuery(
"WeblogPermission.getByWebsiteAndUser");
q.setParameter(1, website);
@@ -968,7 +968,7 @@
/**
* Get pending permissions for user
*/
- public List getPendingPermissions(UserData user) throws RollerException {
+ public List getPendingPermissions(User user) throws RollerException {
Query q = strategy.getNamedQuery(
"WeblogPermission.getByUserAndPending");
q.setParameter(1, user);
@@ -1001,7 +1001,7 @@
/**
* Get all permissions of a user.
*/
- public List getAllPermissions(UserData user) throws RollerException {
+ public List getAllPermissions(User user) throws RollerException {
Query q = strategy.getNamedQuery(
"WeblogPermission.getByUserAndPending");
q.setParameter(1, user);
@@ -1015,7 +1015,7 @@
String lc = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
Map results = new TreeMap();
Query query = strategy.getNamedQuery(
- "UserData.getCountByUserNameLike");
+ "User.getCountByUserNameLike");
for (int i=0; i<26; i++) {
char currentChar = lc.charAt(i);
query.setParameter(1, currentChar + "%");
@@ -1029,7 +1029,7 @@
public List getUsersByLetter(char letter, int offset, int length)
throws RollerException {
Query query = strategy.getNamedQuery(
- "UserData.getByUserNameOrderByUserName");
+ "User.getByUserNameOrderByUserName");
query.setParameter(1, letter + "%");
if (offset != 0) {
query.setFirstResult(offset);
@@ -1133,7 +1133,7 @@
*/
public long getUserCount() throws RollerException {
long ret = 0;
- Query q = strategy.getNamedQuery("UserData.getCountEnabledDistinct");
+ Query q = strategy.getNamedQuery("User.getCountEnabledDistinct");
q.setParameter(1, Boolean.TRUE);
List results = q.getResultList();
ret =((Long)results.get(0)).longValue();
@@ -1141,13 +1141,13 @@
return ret;
}
- public UserData getUserByActivationCode(String activationCode) throws RollerException {
+ public User getUserByActivationCode(String activationCode) throws RollerException {
if (activationCode == null)
throw new RollerException("activationcode is null");
- Query q = strategy.getNamedQuery("UserData.getUserByActivationCode");
+ Query q = strategy.getNamedQuery("User.getUserByActivationCode");
q.setParameter(1, activationCode);
try {
- return (UserData)q.getSingleResult();
+ return (User)q.getSingleResult();
} catch (NoResultException e) {
return null;
}
Modified: roller/trunk/src/org/apache/roller/business/jpa/JPAWeblogManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/business/jpa/JPAWeblogManagerImpl.java?view=diff&rev=542688&r1=542687&r2=542688
==============================================================================
--- roller/trunk/src/org/apache/roller/business/jpa/JPAWeblogManagerImpl.java (original)
+++ roller/trunk/src/org/apache/roller/business/jpa/JPAWeblogManagerImpl.java Tue May 29 15:47:17 2007
@@ -48,14 +48,14 @@
import org.apache.roller.pojos.TagStat;
import org.apache.roller.pojos.TagStatComparator;
import org.apache.roller.pojos.TagStatCountComparator;
-import org.apache.roller.pojos.WeblogCategoryData;
-import org.apache.roller.pojos.WeblogEntryData;
-import org.apache.roller.pojos.WeblogEntryTagAggregateData;
-import org.apache.roller.pojos.WeblogEntryTagData;
+import org.apache.roller.pojos.WeblogCategory;
+import org.apache.roller.pojos.WeblogEntry;
+import org.apache.roller.pojos.WeblogEntryTagAggregate;
+import org.apache.roller.pojos.WeblogEntryTag;
import org.apache.roller.pojos.Weblog;
import org.apache.roller.pojos.WeblogEntryAttribute;
import org.apache.roller.pojos.StatCountCountComparator;
-import org.apache.roller.pojos.UserData;
+import org.apache.roller.pojos.User;
import org.apache.roller.util.DateUtil;
/*
@@ -95,7 +95,7 @@
/**
* @inheritDoc
*/
- public void saveWeblogCategory(WeblogCategoryData cat) throws RollerException {
+ public void saveWeblogCategory(WeblogCategory cat) throws RollerException {
boolean exists = getWeblogCategory(cat.getId()) != null;
if (!exists) {
if (isDuplicateWeblogCategoryName(cat)) {
@@ -103,7 +103,7 @@
}
// Newly added object. If it has a parent,
// maintain relationship from both sides
- WeblogCategoryData parent = cat.getParent();
+ WeblogCategory parent = cat.getParent();
if(parent != null) {
parent.getWeblogCategories().add(cat);
}
@@ -117,7 +117,7 @@
/**
* @inheritDoc
*/
- public void removeWeblogCategory(WeblogCategoryData cat)
+ public void removeWeblogCategory(WeblogCategory cat)
throws RollerException {
if(cat.retrieveWeblogEntries(true).size() > 0) {
throw new RollerException("Cannot remove category with entries");
@@ -126,20 +126,20 @@
// remove cat
this.strategy.remove(cat);
//relationship management for the other side
- WeblogCategoryData parent = cat.getParent();
+ WeblogCategory parent = cat.getParent();
if(parent != null) {
parent.getWeblogCategories().remove(cat);
}
// update website default cats if needed
if(cat.getWebsite().getBloggerCategory().equals(cat)) {
- WeblogCategoryData rootCat = this.getRootWeblogCategory(cat.getWebsite());
+ WeblogCategory rootCat = this.getRootWeblogCategory(cat.getWebsite());
cat.getWebsite().setBloggerCategory(rootCat);
this.strategy.store(cat.getWebsite());
}
if(cat.getWebsite().getDefaultCategory().equals(cat)) {
- WeblogCategoryData rootCat = this.getRootWeblogCategory(cat.getWebsite());
+ WeblogCategory rootCat = this.getRootWeblogCategory(cat.getWebsite());
cat.getWebsite().setDefaultCategory(rootCat);
this.strategy.store(cat.getWebsite());
}
@@ -152,7 +152,7 @@
/**
* @inheritDoc
*/
- public void moveWeblogCategory(WeblogCategoryData srcCat, WeblogCategoryData destCat)
+ public void moveWeblogCategory(WeblogCategory srcCat, WeblogCategory destCat)
throws RollerException {
// TODO: this check should be made before calling this method?
@@ -165,7 +165,7 @@
" under "+destCat.getPath());
- WeblogCategoryData oldParent = srcCat.getParent();
+ WeblogCategory oldParent = srcCat.getParent();
if(oldParent != null) {
oldParent.getWeblogCategories().remove(srcCat);
}
@@ -186,15 +186,15 @@
// updates the paths of all descendents of the given category
- private void updatePathTree(WeblogCategoryData cat)
+ private void updatePathTree(WeblogCategory cat)
throws RollerException {
log.debug("Updating path tree for category "+cat.getPath());
- WeblogCategoryData childCat = null;
+ WeblogCategory childCat = null;
Iterator childCats = cat.getWeblogCategories().iterator();
while(childCats.hasNext()) {
- childCat = (WeblogCategoryData) childCats.next();
+ childCat = (WeblogCategory) childCats.next();
log.debug("OLD child category path was "+childCat.getPath());
@@ -216,8 +216,8 @@
/**
* @inheritDoc
*/
- public void moveWeblogCategoryContents(WeblogCategoryData srcCat,
- WeblogCategoryData destCat)
+ public void moveWeblogCategoryContents(WeblogCategory srcCat,
+ WeblogCategory destCat)
throws RollerException {
// TODO: this check should be made before calling this method?
@@ -233,7 +233,7 @@
Iterator iter = results.iterator();
Weblog website = destCat.getWebsite();
while (iter.hasNext()) {
- WeblogEntryData entry = (WeblogEntryData) iter.next();
+ WeblogEntry entry = (WeblogEntry) iter.next();
entry.setCategory(destCat);
entry.setWebsite(website);
this.strategy.store(entry);
@@ -283,7 +283,7 @@
* @inheritDoc
*/
// TODO: perhaps the createAnchor() and queuePings() items should go outside this method?
- public void saveWeblogEntry(WeblogEntryData entry) throws RollerException {
+ public void saveWeblogEntry(WeblogEntry entry) throws RollerException {
if (entry.getAnchor() == null || entry.getAnchor().trim().equals("")) {
entry.setAnchor(this.createAnchor(entry));
@@ -304,7 +304,7 @@
// more than 1 minute into the future
if ("PUBLISHED".equals(entry.getStatus()) &&
entry.getPubTime().after(new Date(System.currentTimeMillis() + 60000))) {
- entry.setStatus(WeblogEntryData.SCHEDULED);
+ entry.setStatus(WeblogEntry.SCHEDULED);
}
// Store value object (creates new or updates existing)
@@ -328,7 +328,7 @@
/**
* @inheritDoc
*/
- public void removeWeblogEntry(WeblogEntryData entry)
+ public void removeWeblogEntry(WeblogEntry entry)
throws RollerException {
Query q = strategy.getNamedQuery("WeblogReferrer.getByWeblogEntry");
q.setParameter(1, entry);
@@ -357,7 +357,7 @@
// remove tags aggregates
if(entry.getTags() != null) {
for(Iterator it = entry.getTags().iterator(); it.hasNext(); ) {
- WeblogEntryTagData tag = (WeblogEntryTagData) it.next();
+ WeblogEntryTag tag = (WeblogEntryTag) it.next();
updateTagCount(tag.getName(), entry.getWebsite(), -1);
it.remove();
this.strategy.remove(tag);
@@ -377,12 +377,12 @@
this.entryAnchorToIdMap.remove(entry.getWebsite().getHandle()+":"+entry.getAnchor());
}
- public List getNextPrevEntries(WeblogEntryData current, String catName,
+ public List getNextPrevEntries(WeblogEntry current, String catName,
String locale, int maxEntries, boolean next)
throws RollerException {
Query query = null;
List results = null;
- WeblogCategoryData category = null;
+ WeblogCategory category = null;
if (catName != null && !catName.trim().equals("/")) {
category = getWeblogCategoryByPath(current.getWebsite(), null,
@@ -393,12 +393,12 @@
int size = 0;
StringBuffer queryString = new StringBuffer();
StringBuffer whereClause = new StringBuffer();
- queryString.append("SELECT e FROM WeblogEntryData e WHERE ");
+ queryString.append("SELECT e FROM WeblogEntry e WHERE ");
params.add(size++, current.getWebsite());
whereClause.append("e.website = ?" + size);
- params.add(size++, WeblogEntryData.PUBLISHED);
+ params.add(size++, WeblogEntry.PUBLISHED);
whereClause.append(" AND e.status = ?" + size);
if (next) {
@@ -441,16 +441,16 @@
/**
* @inheritDoc
*/
- public WeblogCategoryData getRootWeblogCategory(Weblog website)
+ public WeblogCategory getRootWeblogCategory(Weblog website)
throws RollerException {
if (website == null)
throw new RollerException("website is null");
Query q = strategy.getNamedQuery(
- "WeblogCategoryData.getByWebsite&ParentNull");
+ "WeblogCategory.getByWebsite&ParentNull");
q.setParameter(1, website);
try {
- return (WeblogCategoryData)q.getSingleResult();
+ return (WeblogCategory)q.getSingleResult();
} catch (NoResultException e) {
return null;
}
@@ -467,7 +467,7 @@
if (includeRoot) return getWeblogCategories(website);
Query q = strategy.getNamedQuery(
- "WeblogCategoryData.getByWebsite&ParentNotNull");
+ "WeblogCategory.getByWebsite&ParentNotNull");
q.setParameter(1, website);
return q.getResultList();
}
@@ -481,7 +481,7 @@
throw new RollerException("website is null");
Query q = strategy.getNamedQuery(
- "WeblogCategoryData.getByWebsite");
+ "WeblogCategory.getByWebsite");
q.setParameter(1, website);
return q.getResultList();
}
@@ -491,7 +491,7 @@
*/
public List getWeblogEntries(
Weblog website,
- UserData user,
+ User user,
Date startDate,
Date endDate,
String catName,
@@ -504,7 +504,7 @@
int offset,
int length) throws RollerException {
- WeblogCategoryData cat = null;
+ WeblogCategory cat = null;
if (StringUtils.isNotEmpty(catName) && website != null) {
cat = getWeblogCategoryByPath(website, catName);
if (cat == null) catName = null;
@@ -517,11 +517,11 @@
int size = 0;
StringBuffer queryString = new StringBuffer();
- //queryString.append("SELECT e FROM WeblogEntryData e WHERE ");
+ //queryString.append("SELECT e FROM WeblogEntry e WHERE ");
if (tags == null || tags.size()==0) {
- queryString.append("SELECT e FROM WeblogEntryData e WHERE ");
+ queryString.append("SELECT e FROM WeblogEntry e WHERE ");
} else {
- queryString.append("SELECT e FROM WeblogEntryData e JOIN e.tags t WHERE ");
+ queryString.append("SELECT e FROM WeblogEntry e JOIN e.tags t WHERE ");
queryString.append("(");
for(int i = 0; i < tags.size(); i++) {
if (i != 0) queryString.append(" OR ");
@@ -540,10 +540,10 @@
}
/*if (tags != null && tags.size() > 0) {
- // A JOIN with WeblogEntryTagData in parent quert will cause a DISTINCT in SELECT clause
- // WeblogEntryData has a clob field and many databases do not link DISTINCT for CLOB fields
+ // A JOIN with WeblogEntryTag in parent quert will cause a DISTINCT in SELECT clause
+ // WeblogEntry has a clob field and many databases do not link DISTINCT for CLOB fields
// Hence as a workaround using corelated EXISTS query.
- queryString.append(" AND EXISTS (SELECT t FROM WeblogEntryTagData t WHERE "
+ queryString.append(" AND EXISTS (SELECT t FROM WeblogEntryTag t WHERE "
+ " t.weblogEntry = e AND t.name IN (");
final String PARAM_SEPERATOR = ", ";
for(int i = 0; i < tags.size(); i++) {
@@ -632,16 +632,16 @@
public List getWeblogEntriesPinnedToMain(Integer max)
throws RollerException {
Query query = strategy.getNamedQuery(
- "WeblogEntryData.getByPinnedToMain&statusOrderByPubTimeDesc");
+ "WeblogEntry.getByPinnedToMain&statusOrderByPubTimeDesc");
query.setParameter(1, Boolean.TRUE);
- query.setParameter(2, WeblogEntryData.PUBLISHED);
+ query.setParameter(2, WeblogEntry.PUBLISHED);
if (max != null) {
query.setMaxResults(max.intValue());
}
return query.getResultList();
}
- public void removeWeblogEntryAttribute(String name, WeblogEntryData entry)
+ public void removeWeblogEntryAttribute(String name, WeblogEntry entry)
throws RollerException {
for (Iterator it = entry.getEntryAttributes().iterator(); it.hasNext();) {
WeblogEntryAttribute entryAttribute = (WeblogEntryAttribute) it.next();
@@ -656,10 +656,10 @@
}
}
- public void removeWeblogEntryTag(String name, WeblogEntryData entry)
+ public void removeWeblogEntryTag(String name, WeblogEntry entry)
throws RollerException {
for (Iterator it = entry.getTags().iterator(); it.hasNext();) {
- WeblogEntryTagData tag = (WeblogEntryTagData) it.next();
+ WeblogEntryTag tag = (WeblogEntryTag) it.next();
if (tag.getName().equals(name)) {
//Call back the entity to adjust its internal state
entry.onRemoveTag(name);
@@ -674,7 +674,7 @@
/**
* @inheritDoc
*/
- public WeblogEntryData getWeblogEntryByAnchor(Weblog website,
+ public WeblogEntry getWeblogEntryByAnchor(Weblog website,
String anchor) throws RollerException {
if (website == null)
@@ -690,7 +690,7 @@
// NOTE: if we ever allow changing anchors then this needs updating
if(this.entryAnchorToIdMap.containsKey(mappingKey)) {
- WeblogEntryData entry = this.getWeblogEntry((String) this.entryAnchorToIdMap.get(mappingKey));
+ WeblogEntry entry = this.getWeblogEntry((String) this.entryAnchorToIdMap.get(mappingKey));
if(entry != null) {
log.debug("entryAnchorToIdMap CACHE HIT - "+mappingKey);
return entry;
@@ -702,12 +702,12 @@
// cache failed, do lookup
Query q = strategy.getNamedQuery(
- "WeblogEntryData.getByWebsite&AnchorOrderByPubTimeDesc");
+ "WeblogEntry.getByWebsite&AnchorOrderByPubTimeDesc");
q.setParameter(1, website);
q.setParameter(2, anchor);
- WeblogEntryData entry = null;
+ WeblogEntry entry = null;
try {
- entry = (WeblogEntryData)q.getSingleResult();
+ entry = (WeblogEntry)q.getSingleResult();
} catch (NoResultException e) {
entry = null;
}
@@ -724,20 +724,20 @@
* @inheritDoc
*/
// TODO: this method should be removed and it's functionality moved to getWeblogEntries()
- public List getWeblogEntries(WeblogCategoryData cat, boolean subcats)
+ public List getWeblogEntries(WeblogCategory cat, boolean subcats)
throws RollerException {
List results = null;
if (!subcats) {
Query q = strategy.getNamedQuery(
- "WeblogEntryData.getByStatus&Category");
- q.setParameter(1, WeblogEntryData.PUBLISHED);
+ "WeblogEntry.getByStatus&Category");
+ q.setParameter(1, WeblogEntry.PUBLISHED);
q.setParameter(2, cat);
results = q.getResultList();
} else {
Query q = strategy.getNamedQuery(
- "WeblogEntryData.getByStatus&Category.pathLike&Website");
- q.setParameter(1, WeblogEntryData.PUBLISHED);
+ "WeblogEntry.getByStatus&Category.pathLike&Website");
+ q.setParameter(1, WeblogEntry.PUBLISHED);
q.setParameter(2, cat.getPath() + '%');
q.setParameter(3, cat.getWebsite());
results = q.getResultList();
@@ -749,7 +749,7 @@
/**
* @inheritDoc
*/
- public String createAnchor(WeblogEntryData entry) throws RollerException {
+ public String createAnchor(WeblogEntry entry) throws RollerException {
// Check for uniqueness of anchor
String base = entry.createAnchorBase();
String name = base;
@@ -761,7 +761,7 @@
}
Query q = strategy.getNamedQuery(
- "WeblogEntryData.getByWebsite&Anchor");
+ "WeblogEntry.getByWebsite&Anchor");
q.setParameter(1, entry.getWebsite());
q.setParameter(2, name);
List results = q.getResultList();
@@ -778,11 +778,11 @@
/**
* @inheritDoc
*/
- public boolean isDuplicateWeblogCategoryName(WeblogCategoryData cat)
+ public boolean isDuplicateWeblogCategoryName(WeblogCategory cat)
throws RollerException {
// ensure that no sibling categories share the same name
- WeblogCategoryData parent = cat.getParent();
+ WeblogCategory parent = cat.getParent();
if (null != parent) {
return (getWeblogCategoryByPath(
cat.getWebsite(), cat.getPath()) != null);
@@ -794,10 +794,10 @@
/**
* @inheritDoc
*/
- public boolean isWeblogCategoryInUse(WeblogCategoryData cat)
+ public boolean isWeblogCategoryInUse(WeblogCategory cat)
throws RollerException {
- Query q = strategy.getNamedQuery("WeblogEntryData.getByCategory");
+ Query q = strategy.getNamedQuery("WeblogEntry.getByCategory");
q.setParameter(1, cat);
int entryCount = q.getResultList().size();
@@ -807,7 +807,7 @@
Iterator cats = cat.getWeblogCategories().iterator();
while (cats.hasNext()) {
- WeblogCategoryData childCat = (WeblogCategoryData)cats.next();
+ WeblogCategory childCat = (WeblogCategory)cats.next();
if (childCat.isInUse()) {
return true;
}
@@ -829,7 +829,7 @@
*/
public List getComments(
Weblog website,
- WeblogEntryData entry,
+ WeblogEntry entry,
String searchString,
Date startDate,
Date endDate,
@@ -914,7 +914,7 @@
*/
public int removeMatchingComments(
Weblog website,
- WeblogEntryData entry,
+ WeblogEntry entry,
String searchString,
Date startDate,
Date endDate,
@@ -940,18 +940,18 @@
/**
* @inheritDoc
*/
- public WeblogCategoryData getWeblogCategory(String id)
+ public WeblogCategory getWeblogCategory(String id)
throws RollerException {
- return (WeblogCategoryData) this.strategy.load(
- WeblogCategoryData.class, id);
+ return (WeblogCategory) this.strategy.load(
+ WeblogCategory.class, id);
}
- //--------------------------------------------- WeblogCategoryData Queries
+ //--------------------------------------------- WeblogCategory Queries
/**
* @inheritDoc
*/
- public WeblogCategoryData getWeblogCategoryByPath(Weblog website,
+ public WeblogCategory getWeblogCategoryByPath(Weblog website,
String categoryPath) throws RollerException {
return getWeblogCategoryByPath(website, null, categoryPath);
}
@@ -960,8 +960,8 @@
* @inheritDoc
*/
// TODO: ditch this method in favor of getWeblogCategoryByPath(weblog, path)
- public WeblogCategoryData getWeblogCategoryByPath(Weblog website,
- WeblogCategoryData category, String path) throws RollerException {
+ public WeblogCategory getWeblogCategoryByPath(Weblog website,
+ WeblogCategory category, String path) throws RollerException {
if (path == null || path.trim().equals("/")) {
return getRootWeblogCategory(website);
@@ -975,11 +975,11 @@
// now just do simple lookup by path
Query q = strategy.getNamedQuery(
- "WeblogCategoryData.getByPath&Website");
+ "WeblogCategory.getByPath&Website");
q.setParameter(1, catPath);
q.setParameter(2, website);
try {
- return (WeblogCategoryData)q.getSingleResult();
+ return (WeblogCategory)q.getSingleResult();
} catch (NoResultException e) {
return null;
}
@@ -996,8 +996,8 @@
/**
* @inheritDoc
*/
- public WeblogEntryData getWeblogEntry(String id) throws RollerException {
- return (WeblogEntryData)strategy.load(WeblogEntryData.class, id);
+ public WeblogEntry getWeblogEntry(String id) throws RollerException {
+ return (WeblogEntry)strategy.load(WeblogEntry.class, id);
}
/**
@@ -1089,7 +1089,7 @@
SimpleDateFormat formatter = DateUtil.get8charDateFormat();
for (Iterator wbItr = entries.iterator(); wbItr.hasNext();) {
- WeblogEntryData entry = (WeblogEntryData) wbItr.next();
+ WeblogEntry entry = (WeblogEntry) wbItr.next();
Date sDate = DateUtil.getNoonOfDay(entry.getPubTime(), cal);
if (stringsOnly) {
if (map.get(sDate) == null)
@@ -1174,12 +1174,12 @@
/**
* @inheritDoc
*/
- public WeblogEntryData getNextEntry(WeblogEntryData current,
+ public WeblogEntry getNextEntry(WeblogEntry current,
String catName, String locale) throws RollerException {
- WeblogEntryData entry = null;
+ WeblogEntry entry = null;
List entryList = getNextPrevEntries(current, catName, locale, 1, true);
if (entryList != null && entryList.size() > 0) {
- entry = (WeblogEntryData)entryList.get(0);
+ entry = (WeblogEntry)entryList.get(0);
}
return entry;
}
@@ -1187,12 +1187,12 @@
/**
* @inheritDoc
*/
- public WeblogEntryData getPreviousEntry(WeblogEntryData current,
+ public WeblogEntry getPreviousEntry(WeblogEntry current,
String catName, String locale) throws RollerException {
- WeblogEntryData entry = null;
+ WeblogEntry entry = null;
List entryList = getNextPrevEntries(current, catName, locale, 1, false);
if (entryList != null && entryList.size() > 0) {
- entry = (WeblogEntryData)entryList.get(0);
+ entry = (WeblogEntry)entryList.get(0);
}
return entry;
}
@@ -1213,7 +1213,7 @@
// TODO: Non-standard JPA bulk update, using parameter values in set clause
Query q = strategy.getNamedUpdate(
- "WeblogEntryData.updateAllowComments&CommentDaysByWebsite");
+ "WeblogEntry.updateAllowComments&CommentDaysByWebsite");
q.setParameter(1, website.getDefaultAllowComments());
q.setParameter(2, new Integer(website.getDefaultCommentDays()));
q.setParameter(3, website);
@@ -1232,24 +1232,24 @@
if (startDate != null) {
Timestamp start = new Timestamp(startDate.getTime());
query = strategy.getNamedQuery(
- "WeblogEntryTagAggregateData.getPopularTagsByWebsite&StartDate");
+ "WeblogEntryTagAggregate.getPopularTagsByWebsite&StartDate");
query.setParameter(1, website);
query.setParameter(2, start);
} else {
Timestamp start = new Timestamp(startDate.getTime());
query = strategy.getNamedQuery(
- "WeblogEntryTagAggregateData.getPopularTagsByWebsite");
+ "WeblogEntryTagAggregate.getPopularTagsByWebsite");
query.setParameter(1, start);
}
} else {
if (startDate != null) {
Timestamp start = new Timestamp(startDate.getTime());
query = strategy.getNamedQuery(
- "WeblogEntryTagAggregateData.getPopularTagsByWebsiteNull&StartDate");
+ "WeblogEntryTagAggregate.getPopularTagsByWebsiteNull&StartDate");
query.setParameter(1, start);
} else {
query = strategy.getNamedQuery(
- "WeblogEntryTagAggregateData.getPopularTagsByWebsiteNull");
+ "WeblogEntryTagAggregate.getPopularTagsByWebsiteNull");
}
}
if (limit != -1) {
@@ -1301,7 +1301,7 @@
List params = new ArrayList();
int size = 0;
StringBuffer queryString = new StringBuffer();
- queryString.append("SELECT w.name, SUM(w.total) FROM WeblogEntryTagAggregateData w WHERE ");
+ queryString.append("SELECT w.name, SUM(w.total) FROM WeblogEntryTagAggregate w WHERE ");
if (website != null) {
params.add(size++, website.getId());
@@ -1362,7 +1362,7 @@
StringBuffer queryString = new StringBuffer();
queryString.append("SELECT DISTINCT w.name ");
- queryString.append("FROM WeblogEntryTagAggregateData w WHERE w.name IN (");
+ queryString.append("FROM WeblogEntryTagAggregate w WHERE w.name IN (");
//?1) AND w.weblog = ?2");
//Append tags as parameter markers to avoid potential escaping issues
//The IN clause would be of form (?1, ?2, ?3, ..)
@@ -1417,22 +1417,22 @@
// eventually that second entry will have a very low total (most likely 1) and
// won't matter
Query weblogQuery = strategy.getNamedQuery(
- "WeblogEntryTagAggregateData.getByName&WebsiteOrderByLastUsedDesc");
+ "WeblogEntryTagAggregate.getByName&WebsiteOrderByLastUsedDesc");
weblogQuery.setParameter(1, name);
weblogQuery.setParameter(2, website);
- WeblogEntryTagAggregateData weblogTagData;
+ WeblogEntryTagAggregate weblogTagData;
try {
- weblogTagData = (WeblogEntryTagAggregateData)weblogQuery.getSingleResult();
+ weblogTagData = (WeblogEntryTagAggregate)weblogQuery.getSingleResult();
} catch (NoResultException e) {
weblogTagData = null;
}
Query siteQuery = strategy.getNamedQuery(
- "WeblogEntryTagAggregateData.getByName&WebsiteNullOrderByLastUsedDesc");
+ "WeblogEntryTagAggregate.getByName&WebsiteNullOrderByLastUsedDesc");
siteQuery.setParameter(1, name);
- WeblogEntryTagAggregateData siteTagData;
+ WeblogEntryTagAggregate siteTagData;
try {
- siteTagData = (WeblogEntryTagAggregateData)siteQuery.getSingleResult();
+ siteTagData = (WeblogEntryTagAggregate)siteQuery.getSingleResult();
} catch (NoResultException e) {
siteTagData = null;
}
@@ -1440,7 +1440,7 @@
// create it only if we are going to need it.
if (weblogTagData == null && amount > 0) {
- weblogTagData = new WeblogEntryTagAggregateData(null, website, name, amount);
+ weblogTagData = new WeblogEntryTagAggregate(null, website, name, amount);
weblogTagData.setLastUsed(lastUsed);
strategy.store(weblogTagData);
@@ -1450,7 +1450,7 @@
strategy.store(weblogTagData);
// Why use update query when only one object needs update?
// Query update = strategy.getNamedUpdate(
-// "WeblogEntryTagAggregateData.updateAddToTotalByName&Weblog");
+// "WeblogEntryTagAggregate.updateAddToTotalByName&Weblog");
// update.setParameter(1, new Long(amount));
// update.setParameter(2, lastUsed);
// update.setParameter(3, weblogTagData.getName());
@@ -1460,7 +1460,7 @@
// create it only if we are going to need it.
if (siteTagData == null && amount > 0) {
- siteTagData = new WeblogEntryTagAggregateData(null, null, name, amount);
+ siteTagData = new WeblogEntryTagAggregate(null, null, name, amount);
siteTagData.setLastUsed(lastUsed);
strategy.store(siteTagData);
@@ -1470,7 +1470,7 @@
strategy.store(siteTagData);
// Why use update query when only one object needs update?
// Query update = strategy.getNamedUpdate(
-// "WeblogEntryTagAggregateData.updateAddToTotalByName&WeblogNull");
+// "WeblogEntryTagAggregate.updateAddToTotalByName&WeblogNull");
// update.setParameter(1, new Long(amount));
// update.setParameter(2, siteTagData.getName());
// update.executeUpdate();
@@ -1478,7 +1478,7 @@
// delete all bad counts
Query removeq = strategy.getNamedUpdate(
- "WeblogEntryTagAggregateData.removeByTotalLessEqual");
+ "WeblogEntryTagAggregate.removeByTotalLessEqual");
removeq.setParameter(1, new Integer(0));
removeq.executeUpdate();
}
@@ -1638,7 +1638,7 @@
*/
public long getEntryCount() throws RollerException {
Query q = strategy.getNamedQuery(
- "WeblogEntryData.getCountDistinctByStatus");
+ "WeblogEntry.getCountDistinctByStatus");
q.setParameter(1, "PUBLISHED");
List results = q.getResultList();
return ((Long)results.get(0)).longValue();
@@ -1649,7 +1649,7 @@
*/
public long getEntryCount(Weblog website) throws RollerException {
Query q = strategy.getNamedQuery(
- "WeblogEntryData.getCountDistinctByStatus&Website");
+ "WeblogEntry.getCountDistinctByStatus&Website");
q.setParameter(1, "PUBLISHED");
q.setParameter(2, website);
List results = q.getResultList();
Modified: roller/trunk/src/org/apache/roller/business/pings/AutoPingManager.java
URL: http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/business/pings/AutoPingManager.java?view=diff&rev=542688&r1=542687&r2=542688
==============================================================================
--- roller/trunk/src/org/apache/roller/business/pings/AutoPingManager.java (original)
+++ roller/trunk/src/org/apache/roller/business/pings/AutoPingManager.java Tue May 29 15:47:17 2007
@@ -23,7 +23,7 @@
import org.apache.roller.RollerException;
import org.apache.roller.pojos.AutoPingData;
import org.apache.roller.pojos.PingTargetData;
-import org.apache.roller.pojos.WeblogEntryData;
+import org.apache.roller.pojos.WeblogEntry;
import org.apache.roller.pojos.Weblog;
@@ -113,7 +113,7 @@
* @param changedWeblogEntry the entry that has been created or changed
* @return a list of the ping configurations that should be applied due to this change
*/
- public List getApplicableAutoPings(WeblogEntryData changedWeblogEntry) throws RollerException;
+ public List getApplicableAutoPings(WeblogEntry changedWeblogEntry) throws RollerException;
/**
@@ -123,7 +123,7 @@
*
* @param changedWeblogEntry the entry that has been created or changed
*/
- public void queueApplicableAutoPings(WeblogEntryData changedWeblogEntry) throws RollerException;
+ public void queueApplicableAutoPings(WeblogEntry changedWeblogEntry) throws RollerException;
/**
Modified: roller/trunk/src/org/apache/roller/business/runnable/ScheduledEntriesTask.java
URL: http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/business/runnable/ScheduledEntriesTask.java?view=diff&rev=542688&r1=542687&r2=542688
==============================================================================
--- roller/trunk/src/org/apache/roller/business/runnable/ScheduledEntriesTask.java (original)
+++ roller/trunk/src/org/apache/roller/business/runnable/ScheduledEntriesTask.java Tue May 29 15:47:17 2007
@@ -28,7 +28,7 @@
import org.apache.roller.business.RollerFactory;
import org.apache.roller.business.WeblogManager;
import org.apache.roller.business.search.IndexManager;
-import org.apache.roller.pojos.WeblogEntryData;
+import org.apache.roller.pojos.WeblogEntry;
import org.apache.roller.util.cache.CacheManager;
@@ -131,13 +131,13 @@
// get all published entries older than current time
List scheduledEntries = wMgr.getWeblogEntries(
+
null, // website
null, // user
null, // startDate
now, // endDate
null, // catName
- null, // tags
- WeblogEntryData.SCHEDULED, // status
+ null,WeblogEntry.SCHEDULED, // status
null, // text
null, // sortBy
null, // sortOrder
@@ -146,13 +146,13 @@
log.debug("promoting "+scheduledEntries.size()+" entries to PUBLISHED state");
- WeblogEntryData entry = null;
+ WeblogEntry entry = null;
Iterator it = scheduledEntries.iterator();
while(it.hasNext()) {
- entry = (WeblogEntryData) it.next();
+ entry = (WeblogEntry) it.next();
// update status to PUBLISHED and save
- entry.setStatus(WeblogEntryData.PUBLISHED);
+ entry.setStatus(WeblogEntry.PUBLISHED);
wMgr.saveWeblogEntry(entry);
}
@@ -163,7 +163,7 @@
// this is because we need the updated entries flushed first
it = scheduledEntries.iterator();
while(it.hasNext()) {
- entry = (WeblogEntryData) it.next();
+ entry = (WeblogEntry) it.next();
// trigger a cache invalidation
CacheManager.invalidate(entry);
Modified: roller/trunk/src/org/apache/roller/business/search/IndexManager.java
URL: http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/business/search/IndexManager.java?view=diff&rev=542688&r1=542687&r2=542688
==============================================================================
--- roller/trunk/src/org/apache/roller/business/search/IndexManager.java (original)
+++ roller/trunk/src/org/apache/roller/business/search/IndexManager.java Tue May 29 15:47:17 2007
@@ -19,8 +19,8 @@
import org.apache.roller.RollerException;
import org.apache.roller.business.search.operations.IndexOperation;
-import org.apache.roller.pojos.UserData;
-import org.apache.roller.pojos.WeblogEntryData;
+import org.apache.roller.pojos.User;
+import org.apache.roller.pojos.WeblogEntry;
import org.apache.roller.pojos.Weblog;
/**
@@ -36,13 +36,13 @@
public void removeWebsiteIndex(Weblog website) throws RollerException;
/** Remove entry from index, returns immediately and operates in background */
- public void removeEntryIndexOperation(WeblogEntryData entry) throws RollerException;
+ public void removeEntryIndexOperation(WeblogEntry entry) throws RollerException;
/** Add entry to index, returns immediately and operates in background */
- public void addEntryIndexOperation(WeblogEntryData entry) throws RollerException;
+ public void addEntryIndexOperation(WeblogEntry entry) throws RollerException;
/** R-index entry, returns immediately and operates in background */
- public void addEntryReIndexOperation(WeblogEntryData entry) throws RollerException;
+ public void addEntryReIndexOperation(WeblogEntry entry) throws RollerException;
/** Execute operation immediately */
public abstract void executeIndexOperationNow(final IndexOperation op);
Modified: roller/trunk/src/org/apache/roller/business/search/IndexManagerImpl.java
URL: http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/business/search/IndexManagerImpl.java?view=diff&rev=542688&r1=542687&r2=542688
==============================================================================
--- roller/trunk/src/org/apache/roller/business/search/IndexManagerImpl.java (original)
+++ roller/trunk/src/org/apache/roller/business/search/IndexManagerImpl.java Tue May 29 15:47:17 2007
@@ -39,7 +39,7 @@
import org.apache.roller.business.search.operations.RemoveEntryOperation;
import org.apache.roller.business.search.operations.RemoveWebsiteIndexOperation;
import org.apache.roller.business.search.operations.WriteToIndexOperation;
-import org.apache.roller.pojos.WeblogEntryData;
+import org.apache.roller.pojos.WeblogEntry;
import org.apache.roller.pojos.Weblog;
import EDU.oswego.cs.dl.util.concurrent.ReadWriteLock;
@@ -184,17 +184,17 @@
new RemoveWebsiteIndexOperation(this, website));
}
- public void addEntryIndexOperation(WeblogEntryData entry) throws RollerException {
+ public void addEntryIndexOperation(WeblogEntry entry) throws RollerException {
AddEntryOperation addEntry = new AddEntryOperation(this, entry);
scheduleIndexOperation(addEntry);
}
- public void addEntryReIndexOperation(WeblogEntryData entry) throws RollerException {
+ public void addEntryReIndexOperation(WeblogEntry entry) throws RollerException {
ReIndexEntryOperation reindex = new ReIndexEntryOperation(this, entry);
scheduleIndexOperation(reindex);
}
- public void removeEntryIndexOperation(WeblogEntryData entry) throws RollerException {
+ public void removeEntryIndexOperation(WeblogEntry entry) throws RollerException {
RemoveEntryOperation removeOp = new RemoveEntryOperation(this, entry);
executeIndexOperationNow(removeOp);
}
Modified: roller/trunk/src/org/apache/roller/business/search/operations/AddEntryOperation.java
URL: http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/business/search/operations/AddEntryOperation.java?view=diff&rev=542688&r1=542687&r2=542688
==============================================================================
--- roller/trunk/src/org/apache/roller/business/search/operations/AddEntryOperation.java (original)
+++ roller/trunk/src/org/apache/roller/business/search/operations/AddEntryOperation.java Tue May 29 15:47:17 2007
@@ -28,7 +28,7 @@
import org.apache.roller.business.Roller;
import org.apache.roller.business.RollerFactory;
import org.apache.roller.business.WeblogManager;
-import org.apache.roller.pojos.WeblogEntryData;
+import org.apache.roller.pojos.WeblogEntry;
/**
* An operation that adds a new log entry into the index.
@@ -43,14 +43,14 @@
//~ Instance fields ========================================================
- private WeblogEntryData data;
+ private WeblogEntry data;
//~ Constructors ===========================================================
/**
* Adds a web log entry into the index.
*/
- public AddEntryOperation(IndexManagerImpl mgr, WeblogEntryData data) {
+ public AddEntryOperation(IndexManagerImpl mgr,WeblogEntry data) {
super(mgr);
this.data = data;
}
Modified: roller/trunk/src/org/apache/roller/business/search/operations/IndexOperation.java
URL: http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/business/search/operations/IndexOperation.java?view=diff&rev=542688&r1=542687&r2=542688
==============================================================================
--- roller/trunk/src/org/apache/roller/business/search/operations/IndexOperation.java (original)
+++ roller/trunk/src/org/apache/roller/business/search/operations/IndexOperation.java Tue May 29 15:47:17 2007
@@ -31,8 +31,8 @@
import org.apache.roller.business.search.IndexManagerImpl;
import org.apache.roller.business.search.FieldConstants;
import org.apache.roller.pojos.WeblogEntryComment;
-import org.apache.roller.pojos.WeblogCategoryData;
-import org.apache.roller.pojos.WeblogEntryData;
+import org.apache.roller.pojos.WeblogCategory;
+import org.apache.roller.pojos.WeblogEntry;
import org.apache.roller.util.Utilities;
import org.apache.roller.config.RollerConfig;
@@ -67,7 +67,7 @@
//~ Methods
// ================================================================
- protected Document getDocument(WeblogEntryData data) {
+ protected Document getDocument(WeblogEntry data) {
// Actual comment content is indexed only if search.index.comments
// is true or absent from the (static) configuration properties.
@@ -134,7 +134,7 @@
doc.add(Field.UnStored(FieldConstants.CONSTANT, FieldConstants.CONSTANT_V));
// index Category
- WeblogCategoryData categorydata = data.getCategory();
+ WeblogCategory categorydata = data.getCategory();
Field category = (categorydata == null)
? Field.UnStored(FieldConstants.CATEGORY, "")
: Field.Text(FieldConstants.CATEGORY, categorydata.getName());
Modified: roller/trunk/src/org/apache/roller/business/search/operations/ReIndexEntryOperation.java
URL: http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/business/search/operations/ReIndexEntryOperation.java?view=diff&rev=542688&r1=542687&r2=542688
==============================================================================
--- roller/trunk/src/org/apache/roller/business/search/operations/ReIndexEntryOperation.java (original)
+++ roller/trunk/src/org/apache/roller/business/search/operations/ReIndexEntryOperation.java Tue May 29 15:47:17 2007
@@ -31,7 +31,7 @@
import org.apache.roller.business.Roller;
import org.apache.roller.business.RollerFactory;
import org.apache.roller.business.WeblogManager;
-import org.apache.roller.pojos.WeblogEntryData;
+import org.apache.roller.pojos.WeblogEntry;
/**
* An operation that adds a new log entry into the index.
@@ -46,14 +46,14 @@
//~ Instance fields ========================================================
- private WeblogEntryData data;
+ private WeblogEntry data;
//~ Constructors ===========================================================
/**
* Adds a web log entry into the index.
*/
- public ReIndexEntryOperation(IndexManagerImpl mgr, WeblogEntryData data) {
+ public ReIndexEntryOperation(IndexManagerImpl mgr,WeblogEntry data) {
super(mgr);
this.data = data;
}
Modified: roller/trunk/src/org/apache/roller/business/search/operations/RebuildWebsiteIndexOperation.java
URL: http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/business/search/operations/RebuildWebsiteIndexOperation.java?view=diff&rev=542688&r1=542687&r2=542688
==============================================================================
--- roller/trunk/src/org/apache/roller/business/search/operations/RebuildWebsiteIndexOperation.java (original)
+++ roller/trunk/src/org/apache/roller/business/search/operations/RebuildWebsiteIndexOperation.java Tue May 29 15:47:17 2007
@@ -37,7 +37,7 @@
import org.apache.roller.business.RollerFactory;
import org.apache.roller.business.UserManager;
import org.apache.roller.business.WeblogManager;
-import org.apache.roller.pojos.WeblogEntryData;
+import org.apache.roller.pojos.WeblogEntry;
import org.apache.roller.pojos.Weblog;
/**
@@ -116,22 +116,22 @@
if (writer != null) {
WeblogManager weblogManager = roller.getWeblogManager();
+
List entries = weblogManager .getWeblogEntries(
+
website, // website
null,
null, // startDate
null, // endDate
null, // catName
- null,
- WeblogEntryData.PUBLISHED, // status
+ null,WeblogEntry.PUBLISHED, // status
null, // text
null, // sortby (null means pubTime)
null,
null,
0, -1); // offset, length, locale
-
for (Iterator wbItr = entries.iterator(); wbItr.hasNext();) {
- WeblogEntryData entry = (WeblogEntryData) wbItr.next();
+ WeblogEntry entry = (WeblogEntry) wbItr.next();
writer.addDocument(getDocument(entry));
mLogger.debug(
MessageFormat.format("Indexed entry {0}: {1}",
Modified: roller/trunk/src/org/apache/roller/business/search/operations/RemoveEntryOperation.java
URL: http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/business/search/operations/RemoveEntryOperation.java?view=diff&rev=542688&r1=542687&r2=542688
==============================================================================
--- roller/trunk/src/org/apache/roller/business/search/operations/RemoveEntryOperation.java (original)
+++ roller/trunk/src/org/apache/roller/business/search/operations/RemoveEntryOperation.java Tue May 29 15:47:17 2007
@@ -29,7 +29,7 @@
import org.apache.roller.business.WeblogManager;
import org.apache.roller.business.search.IndexManagerImpl;
import org.apache.roller.business.search.FieldConstants;
-import org.apache.roller.pojos.WeblogEntryData;
+import org.apache.roller.pojos.WeblogEntry;
/**
@@ -45,11 +45,11 @@
//~ Instance fields ========================================================
- private WeblogEntryData data;
+ private WeblogEntry data;
//~ Constructors ===========================================================
- public RemoveEntryOperation(IndexManagerImpl mgr, WeblogEntryData data) {
+ public RemoveEntryOperation(IndexManagerImpl mgr,WeblogEntry data) {
super(mgr);
this.data = data;
}
Modified: roller/trunk/src/org/apache/roller/planet/business/RollerRomeFeedFetcher.java
URL: http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/planet/business/RollerRomeFeedFetcher.java?view=diff&rev=542688&r1=542687&r2=542688
==============================================================================
--- roller/trunk/src/org/apache/roller/planet/business/RollerRomeFeedFetcher.java (original)
+++ roller/trunk/src/org/apache/roller/planet/business/RollerRomeFeedFetcher.java Tue May 29 15:47:17 2007
@@ -38,7 +38,7 @@
import org.apache.roller.config.RollerRuntimeConfig;
import org.apache.roller.planet.pojos.PlanetEntryData;
import org.apache.roller.planet.pojos.PlanetSubscriptionData;
-import org.apache.roller.pojos.WeblogEntryData;
+import org.apache.roller.pojos.WeblogEntry;
import org.apache.roller.pojos.Weblog;
/**
@@ -99,13 +99,13 @@
int entryCount = RollerRuntimeConfig.getIntProperty(
"site.newsfeeds.defaultEntries");
entries = blogmgr.getWeblogEntries(
+
website,
null,
null, // startDate
null, // endDate
null, // catName
- null, // tags
- WeblogEntryData.PUBLISHED, // status
+ null,WeblogEntry.PUBLISHED, // status
null, // text
null, // sortby (null means pubTime)
null,
@@ -132,8 +132,8 @@
Iterator entryIter = entries.iterator();
while (entryIter.hasNext()) {
try {
- WeblogEntryData rollerEntry =
- (WeblogEntryData)entryIter.next();
+ WeblogEntry rollerEntry =
+ (WeblogEntry)entryIter.next();
PlanetEntryData entry = new PlanetEntryData();
String content = "";
Modified: roller/trunk/src/org/apache/roller/pojos/PingCategoryRestrictionData.java
URL: http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/pojos/PingCategoryRestrictionData.java?view=diff&rev=542688&r1=542687&r2=542688
==============================================================================
--- roller/trunk/src/org/apache/roller/pojos/PingCategoryRestrictionData.java (original)
+++ roller/trunk/src/org/apache/roller/pojos/PingCategoryRestrictionData.java Tue May 29 15:47:17 2007
@@ -25,20 +25,20 @@
/**
* Ping Category Restriction. An instance of this class relates an auto ping configuration {@link AutoPingData} to a
- * specific weblog category {@link WeblogCategoryData}. When one or more instances of this class are present for a
+ * specific weblog category {@link WeblogCategory}. When one or more instances of this class are present for a
* given auto ping configuration, it means that pings should only go out for changes to the categories specified by those
* instances. If no instances of this class are present for a given auto ping configuration, it means that the ping
* configuration is not restricted by category, so pings should go out for changes in any category.
- *
+ *
* @author <a href="mailto:anil@busybuddha.org">Anil Gangolli</a>
* @ejb:bean name="AutoPingData"
- * @hibernate.class lazy="true" table="pingcategory"
* @hibernate.cache usage="read-write"
+ * @hibernate.class lazy="true" table="pingcategory"
*/
public class PingCategoryRestrictionData implements Serializable {
private String id = UUIDGenerator.generateUUID();
private AutoPingData autoPing;
- private WeblogCategoryData weblogCategory;
+ private WeblogCategory weblogCategory;
static final long serialVersionUID = 2261280579491859418L;
@@ -55,7 +55,7 @@
* @param autoPing auto ping configuration being restricted
* @param weblogCategory weblog category to which this auto ping configuration is restricted
*/
- public PingCategoryRestrictionData(String id, AutoPingData autoPing, WeblogCategoryData weblogCategory) {
+ public PingCategoryRestrictionData(String id, AutoPingData autoPing, WeblogCategory weblogCategory) {
//this.id = id;
this.autoPing = autoPing;
this.weblogCategory = weblogCategory;
@@ -121,7 +121,7 @@
* @ejb:persistent-field
* @hibernate.many-to-one column="weblogcategoryid" cascade="none" not-null="true"
*/
- public WeblogCategoryData getWeblogCategory() {
+ public WeblogCategory getWeblogCategory() {
return weblogCategory;
}
@@ -131,7 +131,7 @@
* @param weblogCategory the weblog category to which pings should be restricted.
* @ejb:persistent-field
*/
- public void setWeblogCategory(WeblogCategoryData weblogCategory) {
+ public void setWeblogCategory(WeblogCategory weblogCategory) {
this.weblogCategory = weblogCategory;
}
Modified: roller/trunk/src/org/apache/roller/pojos/PingCategoryRestrictionData.orm.xml
URL: http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/pojos/PingCategoryRestrictionData.orm.xml?view=diff&rev=542688&r1=542687&r2=542688
==============================================================================
--- roller/trunk/src/org/apache/roller/pojos/PingCategoryRestrictionData.orm.xml (original)
+++ roller/trunk/src/org/apache/roller/pojos/PingCategoryRestrictionData.orm.xml Tue May 29 15:47:17 2007
@@ -20,7 +20,7 @@
<join-column name="autopingid" insertable="true" updatable="true" nullable="false"/>
</many-to-one>
<many-to-one name="weblogCategory"
- target-entity="org.apache.roller.pojos.WeblogCategoryData">
+ target-entity="org.apache.roller.pojos.WeblogCategory">
<join-column name="weblogcategoryid" insertable="true" updatable="true"
nullable="false"/>
</many-to-one>
Copied: roller/trunk/src/org/apache/roller/pojos/User.java (from r542656, roller/trunk/src/org/apache/roller/pojos/UserData.java)
URL: http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/pojos/User.java?view=diff&rev=542688&p1=roller/trunk/src/org/apache/roller/pojos/UserData.java&r1=542656&p2=roller/trunk/src/org/apache/roller/pojos/User.java&r2=542688
==============================================================================
--- roller/trunk/src/org/apache/roller/pojos/UserData.java (original)
+++ roller/trunk/src/org/apache/roller/pojos/User.java Tue May 29 15:47:17 2007
@@ -37,20 +37,20 @@
/**
* User bean.
+ *
* @author David M Johnson
- *
- * @ejb:bean name="UserData"
- * @struts.form include-all="true"
- * @hibernate.class lazy="true" table="rolleruser"
+ * @ejb:bean name="User"
* @hibernate.cache usage="read-write"
+ * @hibernate.class lazy="true" table="rolleruser"
+ * @struts.form include-all="true"
*/
-public class UserData
+public class User
implements Serializable {
- public static final UserData SYSTEM_USER = new UserData(
+ public static final User SYSTEM_USER = new User(
"n/a","systemuser","n/a","systemuser","n/a",
"en_US_WIN", "America/Los_Angeles", new Date(), Boolean.TRUE);
- public static final UserData ANONYMOUS_USER = new UserData(
+ public static final User ANONYMOUS_USER = new User(
"n/a","anonymoususer","n/a","anonymoususer","n/a",
"en_US_WIN", "America/Los_Angeles", new Date(), Boolean.TRUE);
@@ -72,10 +72,10 @@
private List permissions = new ArrayList();
- public UserData() {
+ public User() {
}
- public UserData( String id, String userName,
+ public User( String id, String userName,
String password, String fullName,
String emailAddress,
String locale, String timeZone,
@@ -92,7 +92,7 @@
this.enabled = isEnabled;
}
- public UserData( UserData otherData ) {
+ public User( User otherData ) {
setData(otherData);
}
@@ -284,8 +284,8 @@
/**
* Set bean properties based on other bean.
*/
- public void setData( UserData otherData ) {
- UserData other = (UserData)otherData;
+ public void setData( User otherData ) {
+ User other = (User)otherData;
this.id = other.getId();
this.userName = other.getUserName();
this.password = other.getPassword();
@@ -396,8 +396,8 @@
public boolean equals(Object other) {
if (other == this) return true;
- if (other instanceof UserData != true) return false;
- UserData o = (UserData)other;
+ if (other instanceof User != true) return false;
+ User o = (User)other;
return new EqualsBuilder().append(getUserName(), o.getUserName()).isEquals();
}
Copied: roller/trunk/src/org/apache/roller/pojos/User.orm.xml (from r542656, roller/trunk/src/org/apache/roller/pojos/UserData.orm.xml)
URL: http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/pojos/User.orm.xml?view=diff&rev=542688&p1=roller/trunk/src/org/apache/roller/pojos/UserData.orm.xml&r1=542656&p2=roller/trunk/src/org/apache/roller/pojos/User.orm.xml&r2=542688
==============================================================================
--- roller/trunk/src/org/apache/roller/pojos/UserData.orm.xml (original)
+++ roller/trunk/src/org/apache/roller/pojos/User.orm.xml Tue May 29 15:47:17 2007
@@ -9,67 +9,67 @@
</persistence-unit-defaults>
</persistence-unit-metadata>
<package>org.apache.roller.pojos</package>
- <entity metadata-complete="true" name="UserData" class="org.apache.roller.pojos.UserData">
+ <entity metadata-complete="true" name="User" class="org.apache.roller.pojos.User">
<table name="rolleruser"/>
- <named-query name="UserData.getAll">
- <query>SELECT u FROM UserData u</query>
+ <named-query name="User.getAll">
+ <query>SELECT u FROM User u</query>
</named-query>
- <named-query name="UserData.getByEnabled">
- <query>SELECT u FROM UserData u WHERE u.enabled = ?1</query>
+ <named-query name="User.getByEnabled">
+ <query>SELECT u FROM User u WHERE u.enabled = ?1</query>
</named-query>
- <named-query name="UserData.getUserByActivationCode">
- <query>SELECT u FROM UserData u WHERE u.activationCode = ?1</query>
+ <named-query name="User.getUserByActivationCode">
+ <query>SELECT u FROM User u WHERE u.activationCode = ?1</query>
</named-query>
- <named-query name="UserData.getByEnabled&EndDateOrderByStartDateDesc">
- <query>SELECT u FROM UserData u WHERE u.enabled = ?1 AND u.dateCreated < ?2 ORDER BY u.dateCreated DESC</query>
+ <named-query name="User.getByEnabled&EndDateOrderByStartDateDesc">
+ <query>SELECT u FROM User u WHERE u.enabled = ?1 AND u.dateCreated < ?2 ORDER BY u.dateCreated DESC</query>
</named-query>
- <named-query name="UserData.getByEnabled&EndDate&StartDate">
- <query>SELECT u FROM UserData u WHERE u.enabled = ?1 AND u.dateCreated < ?2 AND u.dateCreated > ?3</query>
+ <named-query name="User.getByEnabled&EndDate&StartDate">
+ <query>SELECT u FROM User u WHERE u.enabled = ?1 AND u.dateCreated < ?2 AND u.dateCreated > ?3</query>
</named-query>
- <named-query name="UserData.getByEnabled&EndDate&StartDateOrderByStartDateDesc">
- <query>SELECT u FROM UserData u WHERE u.enabled = ?1 AND u.dateCreated < ?2 AND u.dateCreated > ?3 ORDER BY u.dateCreated DESC</query>
+ <named-query name="User.getByEnabled&EndDate&StartDateOrderByStartDateDesc">
+ <query>SELECT u FROM User u WHERE u.enabled = ?1 AND u.dateCreated < ?2 AND u.dateCreated > ?3 ORDER BY u.dateCreated DESC</query>
</named-query>
- <named-query name="UserData.getByEnabled&Permissions.website">
- <query>SELECT u FROM UserData u JOIN u.permissions p WHERE u.enabled = ?1 AND p.website = ?2</query>
+ <named-query name="User.getByEnabled&Permissions.website">
+ <query>SELECT u FROM User u JOIN u.permissions p WHERE u.enabled = ?1 AND p.website = ?2</query>
</named-query>
- <named-query name="UserData.getByEnabled&UserNameOrEmailAddressStartsWith">
- <query>SELECT u FROM UserData u WHERE u.enabled = ?1 AND (u.userName LIKE ?2 OR u.emailAddress LIKE ?3)</query>
+ <named-query name="User.getByEnabled&UserNameOrEmailAddressStartsWith">
+ <query>SELECT u FROM User u WHERE u.enabled = ?1 AND (u.userName LIKE ?2 OR u.emailAddress LIKE ?3)</query>
</named-query>
- <named-query name="UserData.getByEndDateOrderByStartDateDesc">
- <query>SELECT u FROM UserData u WHERE u.dateCreated < ?1 ORDER BY u.dateCreated DESC</query>
+ <named-query name="User.getByEndDateOrderByStartDateDesc">
+ <query>SELECT u FROM User u WHERE u.dateCreated < ?1 ORDER BY u.dateCreated DESC</query>
</named-query>
- <named-query name="UserData.getByUserName">
- <query>SELECT u FROM UserData u WHERE u.userName= ?1</query>
+ <named-query name="User.getByUserName">
+ <query>SELECT u FROM User u WHERE u.userName= ?1</query>
</named-query>
- <named-query name="UserData.getByUserName&Enabled">
- <query>SELECT u FROM UserData u WHERE u.userName= ?1 AND u.enabled = ?2</query>
+ <named-query name="User.getByUserName&Enabled">
+ <query>SELECT u FROM User u WHERE u.userName= ?1 AND u.enabled = ?2</query>
</named-query>
- <named-query name="UserData.getByUserNameOrEmailAddressStartsWith">
- <query>SELECT u FROM UserData u WHERE u.userName LIKE ?1 OR u.emailAddress LIKE ?1</query>
+ <named-query name="User.getByUserNameOrEmailAddressStartsWith">
+ <query>SELECT u FROM User u WHERE u.userName LIKE ?1 OR u.emailAddress LIKE ?1</query>
</named-query>
- <named-query name="UserData.getByUserNameOrderByUserName">
- <query>SELECT u FROM UserData u WHERE u.userName= ?1 ORDER BY u.userName</query>
+ <named-query name="User.getByUserNameOrderByUserName">
+ <query>SELECT u FROM User u WHERE u.userName= ?1 ORDER BY u.userName</query>
</named-query>
- <named-query name="UserData.getByPermissions.website">
- <query>SELECT u FROM UserData u JOIN u.permissions p WHERE p.website = ?1</query>
+ <named-query name="User.getByPermissions.website">
+ <query>SELECT u FROM User u JOIN u.permissions p WHERE p.website = ?1</query>
</named-query>
- <named-query name="UserData.getByPermissions.website&Enabled&EndDate&StartDate">
- <query>SELECT u FROM UserData u JOIN u.permissions p WHERE p.website = ?1 AND u.enabled = ?2 AND u.dateCreated < ?3 AND u.dateCreated > ?4</query>
+ <named-query name="User.getByPermissions.website&Enabled&EndDate&StartDate">
+ <query>SELECT u FROM User u JOIN u.permissions p WHERE p.website = ?1 AND u.enabled = ?2 AND u.dateCreated < ?3 AND u.dateCreated > ?4</query>
</named-query>
- <named-query name="UserData.getByPermissions.website&EndDate&StartDate">
- <query>SELECT u FROM UserData u JOIN u.permissions p WHERE p.website = ?1 AND u.dateCreated < ?2 AND u.dateCreated > ?3</query>
+ <named-query name="User.getByPermissions.website&EndDate&StartDate">
+ <query>SELECT u FROM User u JOIN u.permissions p WHERE p.website = ?1 AND u.dateCreated < ?2 AND u.dateCreated > ?3</query>
</named-query>
- <named-query name="UserData.getByEndDate&StartDateOrderByStartDateDesc">
- <query>SELECT u FROM UserData u WHERE u.dateCreated < ?1 AND u.dateCreated > ?2 ORDER BY u.dateCreated DESC</query>
+ <named-query name="User.getByEndDate&StartDateOrderByStartDateDesc">
+ <query>SELECT u FROM User u WHERE u.dateCreated < ?1 AND u.dateCreated > ?2 ORDER BY u.dateCreated DESC</query>
</named-query>
- <named-query name="UserData.getCountByUserNameLike">
- <query>SELECT COUNT(u) FROM UserData u WHERE UPPER(u.userName) LIKE ?1</query>
+ <named-query name="User.getCountByUserNameLike">
+ <query>SELECT COUNT(u) FROM User u WHERE UPPER(u.userName) LIKE ?1</query>
</named-query>
- <named-query name="UserData.getCountEnabledDistinct">
+ <named-query name="User.getCountEnabledDistinct">
<!--
- DISTINCT is not required for this query as no duplicate UserData would be retrieved
+ DISTINCT is not required for this query as no duplicate User would be retrieved
-->
- <query>SELECT COUNT(u) FROM UserData u WHERE u.enabled = ?1</query>
+ <query>SELECT COUNT(u) FROM User u WHERE u.enabled = ?1</query>
</named-query>
<attributes>
<id name="id">
Modified: roller/trunk/src/org/apache/roller/pojos/UserRole.java
URL: http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/pojos/UserRole.java?view=diff&rev=542688&r1=542687&r2=542688
==============================================================================
--- roller/trunk/src/org/apache/roller/pojos/UserRole.java (original)
+++ roller/trunk/src/org/apache/roller/pojos/UserRole.java Tue May 29 15:47:17 2007
@@ -38,14 +38,14 @@
private java.lang.String id = UUIDGenerator.generateUUID();
private java.lang.String userName;
- private UserData user;
+ private User user;
private java.lang.String role;
public UserRole()
{
}
- public UserRole(String id, UserData user, String role)
+ public UserRole(String id, User user, String role)
{
//this.id = id;
this.userName = user.getUserName();
@@ -94,12 +94,12 @@
* @hibernate.many-to-one column="userid" cascade="none" not-null="true"
* @ejb:persistent-field
*/
- public UserData getUser()
+ public User getUser()
{
return this.user;
}
/** @ejb:persistent-field */
- public void setUser( UserData user )
+ public void setUser( User user )
{
this.user = user;
}
Modified: roller/trunk/src/org/apache/roller/pojos/UserRole.orm.xml
URL: http://svn.apache.org/viewvc/roller/trunk/src/org/apache/roller/pojos/UserRole.orm.xml?view=diff&rev=542688&r1=542687&r2=542688
==============================================================================
--- roller/trunk/src/org/apache/roller/pojos/UserRole.orm.xml (original)
+++ roller/trunk/src/org/apache/roller/pojos/UserRole.orm.xml Tue May 29 15:47:17 2007
@@ -21,7 +21,7 @@
<basic name="role">
<column name="rolename" insertable="true" updatable="true" unique="false"/>
</basic>
- <many-to-one name="user" target-entity="org.apache.roller.pojos.UserData">
+ <many-to-one name="user" target-entity="org.apache.roller.pojos.User">
<join-column name="userid" insertable="true" updatable="true" nullable="false"/>
</many-to-one>
</attributes>