From: <cl...@hy...> - 2008-10-14 22:45:51
|
Author: clee Date: 2008-10-14 15:45:38 -0700 (Tue, 14 Oct 2008) New Revision: 11474 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=11474 Modified: trunk/src/org/hyperic/hq/appdef/server/session/ServerManagerEJBImpl.java trunk/src/org/hyperic/hq/appdef/shared/AIConversionUtil.java Log: Change return type from ServerManager to be POJO type Modified: trunk/src/org/hyperic/hq/appdef/server/session/ServerManagerEJBImpl.java =================================================================== --- trunk/src/org/hyperic/hq/appdef/server/session/ServerManagerEJBImpl.java 2008-10-14 22:42:41 UTC (rev 11473) +++ trunk/src/org/hyperic/hq/appdef/server/session/ServerManagerEJBImpl.java 2008-10-14 22:45:38 UTC (rev 11474) @@ -659,14 +659,14 @@ * @return ServerTypeValue * @ejb:interface-method */ - public ServerTypeValue findServerTypeByName(String name) + public ServerType findServerTypeByName(String name) throws FinderException { ServerType ejb = findServerTypePojoByName(name); if (ejb == null) { throw new FinderException("name not found: " + name); } - return ejb.getServerTypeValue(); + return ejb; } /** Modified: trunk/src/org/hyperic/hq/appdef/shared/AIConversionUtil.java =================================================================== --- trunk/src/org/hyperic/hq/appdef/shared/AIConversionUtil.java 2008-10-14 22:42:41 UTC (rev 11473) +++ trunk/src/org/hyperic/hq/appdef/shared/AIConversionUtil.java 2008-10-14 22:45:38 UTC (rev 11474) @@ -27,6 +27,8 @@ import javax.ejb.FinderException; +import org.hyperic.hq.appdef.server.session.ServerType; + /** * A utility for converting value objects from AI to appdef. */ @@ -87,15 +89,15 @@ ServerManagerLocal serverMgr) throws FinderException { - ServerTypeValue stValue; - stValue = serverMgr.findServerTypeByName(aiserver.getServerTypeName()); + ServerType stype = + serverMgr.findServerTypeByName(aiserver.getServerTypeName()); ServerValue server = new ServerValue(); server.setDescription(aiserver.getDescription()); server.setName (aiserver.getName()); server.setInstallPath(aiserver.getInstallPath()); server.setAutoinventoryIdentifier(aiserver.getAutoinventoryIdentifier()); - server.setServerType(stValue); + server.setServerType(stype.getServerTypeValue()); if ( server.getName() == null ) { server.setName(aiserver.getServerTypeName() |