[sepia~sepia-svn-repository:33] Import v1.0
- From: patriceG@kenai.com
- To: commits@sepia.kenai.com
- Subject: [sepia~sepia-svn-repository:33] Import v1.0
- Date: Mon, 7 Dec 2009 08:58:52 +0000
Project: sepia
Repository: sepia-svn-repository
Revision: 33
Author: patriceG
Date: 2009-12-07 08:58:47 UTC
Link:
Log Message:
------------
Import v1.0
Revisions:
----------
33
Added Paths:
------------
WSSL2-training/WebSpaceService/service/classes/com/sample/movie/service
WSSL2-training/WebSpaceService/src/java/META-INF/dynamic-data-source-spring.xml
WSSL2-training/WebSpaceService/service/src/com/sample
WSSL2-training/WebSpaceService/web/WEB-INF/sql/sequences.sql
WSSL2-training/WebSpaceService/test
WSSL2-training/WebSpaceService/service/classes/com/sample/movie/service/persistence/MovieUtil.class
WSSL2-training/WebSpaceService/service/classes
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service
WSSL2-training/WebSpaceService/src/java/com/sample/movie/service/base
WSSL2-training/WebSpaceService/service/src
WSSL2-training/WebSpaceService/service/classes/com/sample/movie/model/MovieSoap.class
WSSL2-training/WebSpaceService/web/WEB-INF/jsp/MovieList_help.jsp
WSSL2-training/WebSpaceService/web/WEB-INF/sql/tables.sql
WSSL2-training/WebSpaceService/nbproject/private
WSSL2-training/WebSpaceService/service/classes/com/sample/movie/NoSuchMovieException.class
WSSL2-training/WebSpaceService/src/conf/MANIFEST.MF
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/persistence
WSSL2-training/WebSpaceService/service/classes/com/sample/movie/model/MovieClp.class
WSSL2-training/WebSpaceService/nbproject/project.properties
WSSL2-training/WebSpaceService/service/classes/com/sample/movie/service/MovieLocalService.class
WSSL2-training/WebSpaceService/src/java/com/sample/movie
WSSL2-training/WebSpaceService/service/classes/com/sample/movie/service/MovieServiceUtil.class
WSSL2-training/WebSpaceService/src/java/com/sample/movie/service/impl
WSSL2-training/WebSpaceService/src/java/com
WSSL2-training/WebSpaceService/src/java/com/test/messages.properties
WSSL2-training/WebSpaceService/web/WEB-INF/liferay-plugin-package.properties
WSSL2-training/WebSpaceService/web/WEB-INF/sql
WSSL2-training/WebSpaceService/service/src/com/sample/movie
WSSL2-training/WebSpaceService/src/java/com/test/MovieList.java
WSSL2-training/WebSpaceService/src/java/META-INF
WSSL2-training/WebSpaceService/web/WEB-INF/liferay-portlet.xml
WSSL2-training/WebSpaceService/service
WSSL2-training/WebSpaceService/web/WEB-INF/sql/indexes.sql
WSSL2-training/WebSpaceService/src/java/com/sample/movie/service/base/MovieServiceBaseImpl.java
WSSL2-training/WebSpaceService/web/WEB-INF/jsp/MovieDataEntryPortlet_view.jsp
WSSL2-training/WebSpaceService/src/java/com/sample/movie/service/persistence/MoviePersistenceImpl.java
WSSL2-training/WebSpaceService/src/java/META-INF/portlet-model-hints.xml
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/persistence/MovieUtil.java
WSSL2-training/WebSpaceService/web/WEB-INF
WSSL2-training/WebSpaceService/web/WEB-INF/jsp
WSSL2-training/WebSpaceService/src/java
WSSL2-training/WebSpaceService/service/src/com/sample/movie/model/MovieModel.java
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/ClpSerializer.java
WSSL2-training/WebSpaceService/build.xml
WSSL2-training/WebSpaceService/web/WEB-INF/jsp/MovieDataEntryPortlet_edit.jsp
WSSL2-training/WebSpaceService/src/java/com/sample/movie/service/impl/MovieLocalServiceImpl.java
WSSL2-training/WebSpaceService/web/WEB-INF/liferay-display.xml
WSSL2-training/WebSpaceService/nbproject/genfiles.properties
WSSL2-training/WebSpaceService/service/classes/com/sample/movie/model/MovieModel.class
WSSL2-training/WebSpaceService/src/java/com/sample/movie/service/base/MovieLocalServiceBaseImpl.java
WSSL2-training/WebSpaceService/service/classes/com/sample/movie/service/MovieLocalServiceClp.class
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/MovieService.java
WSSL2-training/WebSpaceService/src/java/META-INF/portlet-hbm.xml
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/MovieServiceClp.java
WSSL2-training/WebSpaceService/src/java/com/test
WSSL2-training/WebSpaceService/nbproject
WSSL2-training/WebSpaceService/web/WEB-INF/jsp/MovieDataEntryPortlet_help.jsp
WSSL2-training/WebSpaceService/src/java/com/sample/movie/service/persistence
WSSL2-training/WebSpaceService/nbproject/build-impl.xml
WSSL2-training/WebSpaceService/nbproject/project.xml
WSSL2-training/WebSpaceService/web/service.xml
WSSL2-training/WebSpaceService/src/java/com/sample/movie/model
WSSL2-training/WebSpaceService/web/WEB-INF/portlet.xml
WSSL2-training/WebSpaceService/src/java/com/sample/movie/model/impl/MovieModelImpl.java
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/MovieLocalServiceClp.java
WSSL2-training/WebSpaceService/src/java/com/sample/movie/service
WSSL2-training/WebSpaceService/web
WSSL2-training/WebSpaceService/src/java/service.properties
WSSL2-training/WebSpaceService/service/classes/com/sample
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/MovieServiceUtil.java
WSSL2-training/WebSpaceService/service/classes/com
WSSL2-training/WebSpaceService/web/WEB-INF/sql/indexes.properties
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/MovieLocalServiceUtil.java
WSSL2-training/WebSpaceService/service/classes/com/sample/movie/service/persistence
WSSL2-training/WebSpaceService/src
WSSL2-training/WebSpaceService/src/conf
WSSL2-training/WebSpaceService/src/java/com/sample/movie/model/impl/MovieImpl.java
WSSL2-training/WebSpaceService/src/java/META-INF/hibernate-spring.xml
WSSL2-training/WebSpaceService/web/WEB-INF/jsp/MovieList_view.jsp
WSSL2-training/WebSpaceService/service/src/com/sample/movie/model/MovieClp.java
WSSL2-training/WebSpaceService/src/java/META-INF/infrastructure-spring.xml
WSSL2-training/WebSpaceService/service/src/com/sample/movie/model
WSSL2-training/WebSpaceService/web/WEB-INF/web.xml
WSSL2-training/WebSpaceService/src/java/com/test/MovieDataEntryPortlet.java
WSSL2-training/WebSpaceService/src/java/com/sample/movie/service/impl/MovieServiceImpl.java
WSSL2-training/WebSpaceService/nbproject/service.NavData
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/persistence/MoviePersistence.java
WSSL2-training/WebSpaceService/service/classes/com/sample/movie/service/MovieServiceClp.class
WSSL2-training/WebSpaceService/nbproject/private/private.properties
WSSL2-training/WebSpaceService/src/java/META-INF/base-spring.xml
WSSL2-training/WebSpaceService/service/classes/com/sample/movie/service/persistence/MoviePersistence.class
WSSL2-training/WebSpaceService/service/classes/com/sample/movie/model/Movie.class
WSSL2-training/WebSpaceService/service/src/com/sample/movie/model/Movie.java
WSSL2-training/WebSpaceService/service/src/com/sample/movie/model/MovieSoap.java
WSSL2-training/WebSpaceService/service/lib
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/MovieLocalService.java
WSSL2-training/WebSpaceService/service/classes/com/sample/movie/service/ClpSerializer.class
WSSL2-training/WebSpaceService/service/src/com
WSSL2-training/WebSpaceService/src/java/com/sample/movie/model/impl
WSSL2-training/WebSpaceService/nbproject/ant-deploy.xml
WSSL2-training/WebSpaceService/service/lib/MovieApplication-service.jar
WSSL2-training/WebSpaceService/service/classes/com/sample/movie
WSSL2-training/WebSpaceService/service/classes/com/sample/movie/service/MovieService.class
WSSL2-training/WebSpaceService/src/java/META-INF/portlet-spring.xml
WSSL2-training/WebSpaceService/service/src/com/sample/movie/NoSuchMovieException.java
WSSL2-training/WebSpaceService/src/java/com/sample
WSSL2-training/WebSpaceService
WSSL2-training/WebSpaceService/web/WEB-INF/jsp/MovieList_edit.jsp
WSSL2-training/WebSpaceService/web/index.jsp
WSSL2-training/WebSpaceService/service/classes/com/sample/movie/model
WSSL2-training/WebSpaceService/service/classes/com/sample/movie/service/MovieLocalServiceUtil.class
Diffs:
------
Index: WSSL2-training/WebSpaceService/service/lib/MovieApplication-service.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on:
WSSL2-training/WebSpaceService/service/lib/MovieApplication-service.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index:
WSSL2-training/WebSpaceService/service/src/com/sample/movie/model/Movie.java
===================================================================
---
WSSL2-training/WebSpaceService/service/src/com/sample/movie/model/Movie.java
(revision 0)
+++
WSSL2-training/WebSpaceService/service/src/com/sample/movie/model/Movie.java
(revision 33)
@@ -0,0 +1,30 @@
+package com.sample.movie.model;
+
+
+/**
+ * <a href="Movie.java.html"><b><i>View Source</i></b></a>
+ *
+ * <p>
+ * ServiceBuilder generated this class. Modifications in this class will be
+ * overwritten the next time is generated.
+ * </p>
+ *
+ * <p>
+ * This interface is a model that represents the <code>Movie</code> table
+ * in the database.
+ * </p>
+ *
+ * <p>
+ * Customize <code>com.sample.movie.model.impl.MovieImpl</code>
+ * and rerun the ServiceBuilder to generate the new methods.
+ * </p>
+ *
+ * @author Brian Wing Shun Chan
+ *
+ * @see com.sample.movie.model.MovieModel
+ * @see com.sample.movie.model.impl.MovieImpl
+ * @see com.sample.movie.model.impl.MovieModelImpl
+ *
+ */
+public interface Movie extends MovieModel {
+}
Index:
WSSL2-training/WebSpaceService/service/src/com/sample/movie/model/MovieModel.java
===================================================================
---
WSSL2-training/WebSpaceService/service/src/com/sample/movie/model/MovieModel.java
(revision 0)
+++
WSSL2-training/WebSpaceService/service/src/com/sample/movie/model/MovieModel.java
(revision 33)
@@ -0,0 +1,50 @@
+package com.sample.movie.model;
+
+import com.liferay.portal.model.BaseModel;
+
+import java.util.Date;
+
+
+/**
+ * <a href="MovieModel.java.html"><b><i>View Source</i></b></a>
+ *
+ * <p>
+ * ServiceBuilder generated this class. Modifications in this class will be
+ * overwritten the next time is generated.
+ * </p>
+ *
+ * <p>
+ * This interface is a model that represents the <code>Movie</code>
+ * table in the database.
+ * </p>
+ *
+ * @author Brian Wing Shun Chan
+ *
+ * @see com.sample.movie.model.Movie
+ * @see com.sample.movie.model.impl.MovieImpl
+ * @see com.sample.movie.model.impl.MovieModelImpl
+ *
+ */
+public interface MovieModel extends BaseModel {
+ public String getPrimaryKey();
+
+ public void setPrimaryKey(String pk);
+
+ public String getName();
+
+ public void setName(String Name);
+
+ public String getCasts();
+
+ public void setCasts(String Casts);
+
+ public String getStory();
+
+ public void setStory(String Story);
+
+ public Date getReleaseDate();
+
+ public void setReleaseDate(Date ReleaseDate);
+
+ public Movie toEscapedModel();
+}
Index:
WSSL2-training/WebSpaceService/service/src/com/sample/movie/model/MovieSoap.java
===================================================================
---
WSSL2-training/WebSpaceService/service/src/com/sample/movie/model/MovieSoap.java
(revision 0)
+++
WSSL2-training/WebSpaceService/service/src/com/sample/movie/model/MovieSoap.java
(revision 33)
@@ -0,0 +1,97 @@
+package com.sample.movie.model;
+
+import java.io.Serializable;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+
+/**
+ * <a href="MovieSoap.java.html"><b><i>View Source</i></b></a>
+ *
+ * <p>
+ * ServiceBuilder generated this class. Modifications in this class will be
+ * overwritten the next time is generated.
+ * </p>
+ *
+ * <p>
+ * This class is used by
+ * <code>com.sample.movie.service.http.MovieServiceSoap</code>.
+ * </p>
+ *
+ * @author Brian Wing Shun Chan
+ *
+ * @see com.sample.movie.service.http.MovieServiceSoap
+ *
+ */
+public class MovieSoap implements Serializable {
+ private String _Name;
+ private String _Casts;
+ private String _Story;
+ private Date _ReleaseDate;
+
+ public MovieSoap() {
+ }
+
+ public static MovieSoap toSoapModel(Movie model) {
+ MovieSoap soapModel = new MovieSoap();
+
+ soapModel.setName(model.getName());
+ soapModel.setCasts(model.getCasts());
+ soapModel.setStory(model.getStory());
+ soapModel.setReleaseDate(model.getReleaseDate());
+
+ return soapModel;
+ }
+
+ public static MovieSoap[] toSoapModels(List<Movie> models) {
+ List<MovieSoap> soapModels = new ArrayList<MovieSoap>(models.size());
+
+ for (Movie model : models) {
+ soapModels.add(toSoapModel(model));
+ }
+
+ return soapModels.toArray(new MovieSoap[soapModels.size()]);
+ }
+
+ public String getPrimaryKey() {
+ return _Name;
+ }
+
+ public void setPrimaryKey(String pk) {
+ setName(pk);
+ }
+
+ public String getName() {
+ return _Name;
+ }
+
+ public void setName(String Name) {
+ _Name = Name;
+ }
+
+ public String getCasts() {
+ return _Casts;
+ }
+
+ public void setCasts(String Casts) {
+ _Casts = Casts;
+ }
+
+ public String getStory() {
+ return _Story;
+ }
+
+ public void setStory(String Story) {
+ _Story = Story;
+ }
+
+ public Date getReleaseDate() {
+ return _ReleaseDate;
+ }
+
+ public void setReleaseDate(Date ReleaseDate) {
+ _ReleaseDate = ReleaseDate;
+ }
+}
Index:
WSSL2-training/WebSpaceService/service/src/com/sample/movie/model/MovieClp.java
===================================================================
---
WSSL2-training/WebSpaceService/service/src/com/sample/movie/model/MovieClp.java
(revision 0)
+++
WSSL2-training/WebSpaceService/service/src/com/sample/movie/model/MovieClp.java
(revision 33)
@@ -0,0 +1,135 @@
+package com.sample.movie.model;
+
+import com.liferay.portal.kernel.bean.ReadOnlyBeanHandler;
+import com.liferay.portal.kernel.util.HtmlUtil;
+import com.liferay.portal.model.impl.BaseModelImpl;
+
+import java.io.Serializable;
+
+import java.lang.reflect.Proxy;
+
+import java.util.Date;
+
+
+public class MovieClp extends BaseModelImpl implements Movie {
+ private String _Name;
+ private String _Casts;
+ private String _Story;
+ private Date _ReleaseDate;
+
+ public MovieClp() {
+ }
+
+ public String getPrimaryKey() {
+ return _Name;
+ }
+
+ public void setPrimaryKey(String pk) {
+ setName(pk);
+ }
+
+ public Serializable getPrimaryKeyObj() {
+ return _Name;
+ }
+
+ public String getName() {
+ return _Name;
+ }
+
+ public void setName(String Name) {
+ _Name = Name;
+ }
+
+ public String getCasts() {
+ return _Casts;
+ }
+
+ public void setCasts(String Casts) {
+ _Casts = Casts;
+ }
+
+ public String getStory() {
+ return _Story;
+ }
+
+ public void setStory(String Story) {
+ _Story = Story;
+ }
+
+ public Date getReleaseDate() {
+ return _ReleaseDate;
+ }
+
+ public void setReleaseDate(Date ReleaseDate) {
+ _ReleaseDate = ReleaseDate;
+ }
+
+ public Movie toEscapedModel() {
+ if (isEscapedModel()) {
+ return this;
+ } else {
+ Movie model = new MovieClp();
+
+ model.setEscapedModel(true);
+
+ model.setName(HtmlUtil.escape(getName()));
+ model.setCasts(HtmlUtil.escape(getCasts()));
+ model.setStory(HtmlUtil.escape(getStory()));
+ model.setReleaseDate(getReleaseDate());
+
+ model = (Movie)
Proxy.newProxyInstance(Movie.class.getClassLoader(),
+ new Class[] { Movie.class }, new
ReadOnlyBeanHandler(model));
+
+ return model;
+ }
+ }
+
+ public Object clone() {
+ MovieClp clone = new MovieClp();
+
+ clone.setName(getName());
+ clone.setCasts(getCasts());
+ clone.setStory(getStory());
+ clone.setReleaseDate(getReleaseDate());
+
+ return clone;
+ }
+
+ public int compareTo(Object obj) {
+ if (obj == null) {
+ return -1;
+ }
+
+ MovieClp movie = (MovieClp) obj;
+
+ String pk = movie.getPrimaryKey();
+
+ return getPrimaryKey().compareTo(pk);
+ }
+
+ public boolean equals(Object obj) {
+ if (obj == null) {
+ return false;
+ }
+
+ MovieClp movie = null;
+
+ try {
+ movie = (MovieClp) obj;
+ } catch (ClassCastException cce) {
+ return false;
+ }
+
+ String pk = movie.getPrimaryKey();
+
+ if (getPrimaryKey().equals(pk)) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public int hashCode() {
+ return getPrimaryKey().hashCode();
+ }
+}
Index:
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/MovieServiceClp.java
===================================================================
---
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/MovieServiceClp.java
(revision 0)
+++
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/MovieServiceClp.java
(revision 33)
@@ -0,0 +1,12 @@
+package com.sample.movie.service;
+
+import com.liferay.portal.kernel.util.ClassLoaderProxy;
+
+
+public class MovieServiceClp implements MovieService {
+ private ClassLoaderProxy _classLoaderProxy;
+
+ public MovieServiceClp(ClassLoaderProxy classLoaderProxy) {
+ _classLoaderProxy = classLoaderProxy;
+ }
+}
Index:
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/MovieService.java
===================================================================
---
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/MovieService.java
(revision 0)
+++
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/MovieService.java
(revision 33)
@@ -0,0 +1,36 @@
+package com.sample.movie.service;
+
+import com.liferay.portal.PortalException;
+import com.liferay.portal.SystemException;
+import com.liferay.portal.kernel.annotation.Transactional;
+
+
+/**
+ * <a href="MovieService.java.html"><b><i>View Source</i></b></a>
+ *
+ * <p>
+ * ServiceBuilder generated this class. Modifications in this class will be
+ * overwritten the next time is generated.
+ * </p>
+ *
+ * <p>
+ * This interface defines the service. The default implementation is
+ * <code>com.sample.movie.service.impl.MovieServiceImpl</code>.
+ * Modify methods in that class and rerun ServiceBuilder to populate this
class
+ * and all other generated classes.
+ * </p>
+ *
+ * <p>
+ * This is a remote service. Methods of this service are expected to have
security checks based on the propagated JAAS credentials because this service
can be accessed remotely.
+ * </p>
+ *
+ * @author Brian Wing Shun Chan
+ *
+ * @see com.sample.movie.service.MovieServiceUtil
+ *
+ */
+@Transactional(rollbackFor = {
+ PortalException.class, SystemException.class}
+)
+public interface MovieService {
+}
Index:
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/persistence/MoviePersistence.java
===================================================================
---
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/persistence/MoviePersistence.java
(revision 0)
+++
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/persistence/MoviePersistence.java
(revision 33)
@@ -0,0 +1,87 @@
+package com.sample.movie.service.persistence;
+
+import com.liferay.portal.PortalException;
+import com.liferay.portal.SystemException;
+import com.liferay.portal.kernel.annotation.Propagation;
+import com.liferay.portal.kernel.annotation.Transactional;
+import com.liferay.portal.service.persistence.BasePersistence;
+
+
+@Transactional(rollbackFor = {
+ PortalException.class, SystemException.class}
+)
+public interface MoviePersistence extends BasePersistence {
+ public com.sample.movie.model.Movie create(java.lang.String Name);
+
+ public com.sample.movie.model.Movie remove(java.lang.String Name)
+ throws com.liferay.portal.SystemException,
+ com.sample.movie.NoSuchMovieException;
+
+ public com.sample.movie.model.Movie remove(
+ com.sample.movie.model.Movie movie)
+ throws com.liferay.portal.SystemException;
+
+ /**
+ * @deprecated Use <code>update(Movie movie, boolean merge)</code>.
+ */
+ public com.sample.movie.model.Movie update(
+ com.sample.movie.model.Movie movie)
+ throws com.liferay.portal.SystemException;
+
+ /**
+ * Add, update, or merge, the entity. This method also calls the model
+ * listeners to trigger the proper events associated with adding,
deleting,
+ * or updating an entity.
+ *
+ * @param movie the entity to add, update, or merge
+ * @param merge boolean value for whether to merge the
entity. The
+ * default value is false. Setting merge
to true is more
+ * expensive and should only be true when
movie is
+ * transient. See LEP-5473 for a detailed
discussion of this
+ * method.
+ * @return true if the portlet can be displayed via Ajax
+ */
+ public com.sample.movie.model.Movie update(
+ com.sample.movie.model.Movie movie, boolean merge)
+ throws com.liferay.portal.SystemException;
+
+ public com.sample.movie.model.Movie updateImpl(
+ com.sample.movie.model.Movie movie, boolean merge)
+ throws com.liferay.portal.SystemException;
+
+ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
+ public com.sample.movie.model.Movie findByPrimaryKey(java.lang.String
Name)
+ throws com.liferay.portal.SystemException,
+ com.sample.movie.NoSuchMovieException;
+
+ public com.sample.movie.model.Movie fetchByPrimaryKey(java.lang.String
Name)
+ throws com.liferay.portal.SystemException;
+
+ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
+ public java.util.List<Object> findWithDynamicQuery(
+ com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
+ throws com.liferay.portal.SystemException;
+
+ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
+ public java.util.List<Object> findWithDynamicQuery(
+ com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int
start,
+ int end) throws com.liferay.portal.SystemException;
+
+ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
+ public java.util.List<com.sample.movie.model.Movie> findAll()
+ throws com.liferay.portal.SystemException;
+
+ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
+ public java.util.List<com.sample.movie.model.Movie> findAll(int start,
+ int end) throws com.liferay.portal.SystemException;
+
+ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
+ public java.util.List<com.sample.movie.model.Movie> findAll(int start,
+ int end, com.liferay.portal.kernel.util.OrderByComparator obc)
+ throws com.liferay.portal.SystemException;
+
+ public void removeAll() throws com.liferay.portal.SystemException;
+
+ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
+ public int countAll() throws com.liferay.portal.SystemException;
+}
Index:
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/persistence/MovieUtil.java
===================================================================
---
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/persistence/MovieUtil.java
(revision 0)
+++
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/persistence/MovieUtil.java
(revision 33)
@@ -0,0 +1,111 @@
+package com.sample.movie.service.persistence;
+
+public class MovieUtil {
+ private static MoviePersistence _persistence;
+
+ public static com.sample.movie.model.Movie create(java.lang.String Name)
{
+ return getPersistence().create(Name);
+ }
+
+ public static com.sample.movie.model.Movie remove(java.lang.String Name)
+ throws com.liferay.portal.SystemException,
+ com.sample.movie.NoSuchMovieException {
+ return getPersistence().remove(Name);
+ }
+
+ public static com.sample.movie.model.Movie remove(
+ com.sample.movie.model.Movie movie)
+ throws com.liferay.portal.SystemException {
+ return getPersistence().remove(movie);
+ }
+
+ /**
+ * @deprecated Use <code>update(Movie movie, boolean merge)</code>.
+ */
+ public static com.sample.movie.model.Movie update(
+ com.sample.movie.model.Movie movie)
+ throws com.liferay.portal.SystemException {
+ return getPersistence().update(movie);
+ }
+
+ /**
+ * Add, update, or merge, the entity. This method also calls the model
+ * listeners to trigger the proper events associated with adding,
deleting,
+ * or updating an entity.
+ *
+ * @param movie the entity to add, update, or merge
+ * @param merge boolean value for whether to merge the
entity. The
+ * default value is false. Setting merge
to true is more
+ * expensive and should only be true when
movie is
+ * transient. See LEP-5473 for a detailed
discussion of this
+ * method.
+ * @return true if the portlet can be displayed via Ajax
+ */
+ public static com.sample.movie.model.Movie update(
+ com.sample.movie.model.Movie movie, boolean merge)
+ throws com.liferay.portal.SystemException {
+ return getPersistence().update(movie, merge);
+ }
+
+ public static com.sample.movie.model.Movie updateImpl(
+ com.sample.movie.model.Movie movie, boolean merge)
+ throws com.liferay.portal.SystemException {
+ return getPersistence().updateImpl(movie, merge);
+ }
+
+ public static com.sample.movie.model.Movie findByPrimaryKey(
+ java.lang.String Name)
+ throws com.liferay.portal.SystemException,
+ com.sample.movie.NoSuchMovieException {
+ return getPersistence().findByPrimaryKey(Name);
+ }
+
+ public static com.sample.movie.model.Movie fetchByPrimaryKey(
+ java.lang.String Name) throws com.liferay.portal.SystemException {
+ return getPersistence().fetchByPrimaryKey(Name);
+ }
+
+ public static java.util.List<Object> findWithDynamicQuery(
+ com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
+ throws com.liferay.portal.SystemException {
+ return getPersistence().findWithDynamicQuery(dynamicQuery);
+ }
+
+ public static java.util.List<Object> findWithDynamicQuery(
+ com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int
start,
+ int end) throws com.liferay.portal.SystemException {
+ return getPersistence().findWithDynamicQuery(dynamicQuery, start,
end);
+ }
+
+ public static java.util.List<com.sample.movie.model.Movie> findAll()
+ throws com.liferay.portal.SystemException {
+ return getPersistence().findAll();
+ }
+
+ public static java.util.List<com.sample.movie.model.Movie> findAll(
+ int start, int end) throws com.liferay.portal.SystemException {
+ return getPersistence().findAll(start, end);
+ }
+
+ public static java.util.List<com.sample.movie.model.Movie> findAll(
+ int start, int end, com.liferay.portal.kernel.util.OrderByComparator
obc)
+ throws com.liferay.portal.SystemException {
+ return getPersistence().findAll(start, end, obc);
+ }
+
+ public static void removeAll() throws com.liferay.portal.SystemException
{
+ getPersistence().removeAll();
+ }
+
+ public static int countAll() throws com.liferay.portal.SystemException {
+ return getPersistence().countAll();
+ }
+
+ public static MoviePersistence getPersistence() {
+ return _persistence;
+ }
+
+ public void setPersistence(MoviePersistence persistence) {
+ _persistence = persistence;
+ }
+}
Index:
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/ClpSerializer.java
===================================================================
---
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/ClpSerializer.java
(revision 0)
+++
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/ClpSerializer.java
(revision 33)
@@ -0,0 +1,182 @@
+package com.sample.movie.service;
+
+import com.liferay.portal.kernel.log.Log;
+import com.liferay.portal.kernel.log.LogFactoryUtil;
+import com.liferay.portal.model.BaseModel;
+
+import com.sample.movie.model.MovieClp;
+
+import java.lang.reflect.Method;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+
+public class ClpSerializer {
+ private static Log _log = LogFactoryUtil.getLog(ClpSerializer.class);
+ private static ClassLoader _classLoader;
+
+ public static void setClassLoader(ClassLoader classLoader) {
+ _classLoader = classLoader;
+ }
+
+ public static Object translateInput(BaseModel oldModel) {
+ Class<?> oldModelClass = oldModel.getClass();
+
+ String oldModelClassName = oldModelClass.getName();
+
+ if (oldModelClassName.equals(MovieClp.class.getName())) {
+ MovieClp oldCplModel = (MovieClp) oldModel;
+
+ ClassLoader contextClassLoader = Thread.currentThread()
+ .getContextClassLoader();
+
+ try {
+ Thread.currentThread().setContextClassLoader(_classLoader);
+
+ try {
+ Class<?> newModelClass =
Class.forName("com.sample.movie.model.impl.MovieImpl",
+ true, _classLoader);
+
+ Object newModel = newModelClass.newInstance();
+
+ Method method0 = newModelClass.getMethod("setName",
+ new Class[] { String.class });
+
+ String value0 = oldCplModel.getName();
+
+ method0.invoke(newModel, value0);
+
+ Method method1 = newModelClass.getMethod("setCasts",
+ new Class[] { String.class });
+
+ String value1 = oldCplModel.getCasts();
+
+ method1.invoke(newModel, value1);
+
+ Method method2 = newModelClass.getMethod("setStory",
+ new Class[] { String.class });
+
+ String value2 = oldCplModel.getStory();
+
+ method2.invoke(newModel, value2);
+
+ Method method3 =
newModelClass.getMethod("setReleaseDate",
+ new Class[] { Date.class });
+
+ Date value3 = oldCplModel.getReleaseDate();
+
+ method3.invoke(newModel, value3);
+
+ return newModel;
+ } catch (Exception e) {
+ _log.error(e, e);
+ }
+ } finally {
+
Thread.currentThread().setContextClassLoader(contextClassLoader);
+ }
+ }
+
+ return oldModel;
+ }
+
+ public static Object translateInput(List<Object> oldList) {
+ List<Object> newList = new ArrayList<Object>(oldList.size());
+
+ for (int i = 0; i < oldList.size(); i++) {
+ Object curObj = oldList.get(i);
+
+ newList.add(translateInput(curObj));
+ }
+
+ return newList;
+ }
+
+ public static Object translateInput(Object obj) {
+ if (obj instanceof BaseModel) {
+ return translateInput((BaseModel) obj);
+ } else if (obj instanceof List) {
+ return translateInput((List<Object>) obj);
+ } else {
+ return obj;
+ }
+ }
+
+ public static Object translateOutput(BaseModel oldModel) {
+ Class<?> oldModelClass = oldModel.getClass();
+
+ String oldModelClassName = oldModelClass.getName();
+
+ if
(oldModelClassName.equals("com.sample.movie.model.impl.MovieImpl")) {
+ ClassLoader contextClassLoader = Thread.currentThread()
+ .getContextClassLoader();
+
+ try {
+ Thread.currentThread().setContextClassLoader(_classLoader);
+
+ try {
+ MovieClp newModel = new MovieClp();
+
+ Method method0 = oldModelClass.getMethod("getName");
+
+ String value0 = (String) method0.invoke(oldModel,
+ (Object[]) null);
+
+ newModel.setName(value0);
+
+ Method method1 = oldModelClass.getMethod("getCasts");
+
+ String value1 = (String) method1.invoke(oldModel,
+ (Object[]) null);
+
+ newModel.setCasts(value1);
+
+ Method method2 = oldModelClass.getMethod("getStory");
+
+ String value2 = (String) method2.invoke(oldModel,
+ (Object[]) null);
+
+ newModel.setStory(value2);
+
+ Method method3 =
oldModelClass.getMethod("getReleaseDate");
+
+ Date value3 = (Date) method3.invoke(oldModel,
+ (Object[]) null);
+
+ newModel.setReleaseDate(value3);
+
+ return newModel;
+ } catch (Exception e) {
+ _log.error(e, e);
+ }
+ } finally {
+
Thread.currentThread().setContextClassLoader(contextClassLoader);
+ }
+ }
+
+ return oldModel;
+ }
+
+ public static Object translateOutput(List<Object> oldList) {
+ List<Object> newList = new ArrayList<Object>(oldList.size());
+
+ for (int i = 0; i < oldList.size(); i++) {
+ Object curObj = oldList.get(i);
+
+ newList.add(translateOutput(curObj));
+ }
+
+ return newList;
+ }
+
+ public static Object translateOutput(Object obj) {
+ if (obj instanceof BaseModel) {
+ return translateOutput((BaseModel) obj);
+ } else if (obj instanceof List) {
+ return translateOutput((List<Object>) obj);
+ } else {
+ return obj;
+ }
+ }
+}
Index:
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/MovieLocalServiceUtil.java
===================================================================
---
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/MovieLocalServiceUtil.java
(revision 0)
+++
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/MovieLocalServiceUtil.java
(revision 33)
@@ -0,0 +1,112 @@
+package com.sample.movie.service;
+
+import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil;
+import com.liferay.portal.kernel.util.ClassLoaderProxy;
+
+
+/**
+ * <a href="MovieLocalServiceUtil.java.html"><b><i>View Source</i></b></a>
+ *
+ * <p>
+ * ServiceBuilder generated this class. Modifications in this class will be
+ * overwritten the next time is generated.
+ * </p>
+ *
+ * <p>
+ * This class provides static methods for the
+ * <code>com.sample.movie.service.MovieLocalService</code>
+ * bean. The static methods of this class calls the same methods of the bean
+ * instance. It's convenient to be able to just write one line to call a
method
+ * on a bean instead of writing a lookup call and a method call.
+ * </p>
+ *
+ * @author Brian Wing Shun Chan
+ *
+ * @see com.sample.movie.service.MovieLocalService
+ *
+ */
+public class MovieLocalServiceUtil {
+ private static MovieLocalService _service;
+
+ public static com.sample.movie.model.Movie addMovie(
+ com.sample.movie.model.Movie movie)
+ throws com.liferay.portal.SystemException {
+ return getService().addMovie(movie);
+ }
+
+ public static com.sample.movie.model.Movie createMovie(
+ java.lang.String Name) {
+ return getService().createMovie(Name);
+ }
+
+ public static void deleteMovie(java.lang.String Name)
+ throws com.liferay.portal.PortalException,
+ com.liferay.portal.SystemException {
+ getService().deleteMovie(Name);
+ }
+
+ public static void deleteMovie(com.sample.movie.model.Movie movie)
+ throws com.liferay.portal.SystemException {
+ getService().deleteMovie(movie);
+ }
+
+ public static java.util.List<Object> dynamicQuery(
+ com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
+ throws com.liferay.portal.SystemException {
+ return getService().dynamicQuery(dynamicQuery);
+ }
+
+ public static java.util.List<Object> dynamicQuery(
+ com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int
start,
+ int end) throws com.liferay.portal.SystemException {
+ return getService().dynamicQuery(dynamicQuery, start, end);
+ }
+
+ public static com.sample.movie.model.Movie getMovie(java.lang.String
Name)
+ throws com.liferay.portal.PortalException,
+ com.liferay.portal.SystemException {
+ return getService().getMovie(Name);
+ }
+
+ public static java.util.List<com.sample.movie.model.Movie> getMovies(
+ int start, int end) throws com.liferay.portal.SystemException {
+ return getService().getMovies(start, end);
+ }
+
+ public static int getMoviesCount()
+ throws com.liferay.portal.SystemException {
+ return getService().getMoviesCount();
+ }
+
+ public static com.sample.movie.model.Movie updateMovie(
+ com.sample.movie.model.Movie movie)
+ throws com.liferay.portal.SystemException {
+ return getService().updateMovie(movie);
+ }
+
+ public static java.util.Collection<com.sample.movie.model.Movie>
getMovies() {
+ return getService().getMovies();
+ }
+
+ public static MovieLocalService getService() {
+ if (_service == null) {
+ Object obj = PortletBeanLocatorUtil.locate("MovieApplication",
+ MovieLocalServiceUtil.class.getName());
+ ClassLoader portletClassLoader = (ClassLoader)
PortletBeanLocatorUtil.locate("MovieApplication",
+ "portletClassLoader");
+
+ ClassLoaderProxy classLoaderProxy = new ClassLoaderProxy(obj,
+ portletClassLoader);
+
+ _service = new MovieLocalServiceClp(classLoaderProxy);
+
+ ClpSerializer.setClassLoader(portletClassLoader);
+ }
+
+ return _service;
+ }
+
+ public void setService(MovieLocalService service) {
+ _service = service;
+ }
+}
Index:
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/MovieLocalServiceClp.java
===================================================================
---
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/MovieLocalServiceClp.java
(revision 0)
+++
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/MovieLocalServiceClp.java
(revision 33)
@@ -0,0 +1,316 @@
+package com.sample.movie.service;
+
+import com.liferay.portal.kernel.util.ClassLoaderProxy;
+import com.liferay.portal.kernel.util.IntegerWrapper;
+import com.liferay.portal.kernel.util.NullWrapper;
+
+
+public class MovieLocalServiceClp implements MovieLocalService {
+ private ClassLoaderProxy _classLoaderProxy;
+
+ public MovieLocalServiceClp(ClassLoaderProxy classLoaderProxy) {
+ _classLoaderProxy = classLoaderProxy;
+ }
+
+ public com.sample.movie.model.Movie addMovie(
+ com.sample.movie.model.Movie movie)
+ throws com.liferay.portal.SystemException {
+ Object paramObj0 = ClpSerializer.translateInput(movie);
+
+ if (movie == null) {
+ paramObj0 = new NullWrapper("com.sample.movie.model.Movie");
+ }
+
+ Object returnObj = null;
+
+ try {
+ returnObj = _classLoaderProxy.invoke("addMovie",
+ new Object[] { paramObj0 });
+ } catch (Throwable t) {
+ if (t instanceof com.liferay.portal.SystemException) {
+ throw (com.liferay.portal.SystemException) t;
+ }
+
+ if (t instanceof RuntimeException) {
+ throw (RuntimeException) t;
+ } else {
+ throw new RuntimeException(t.getClass().getName() +
+ " is not a valid exception");
+ }
+ }
+
+ return (com.sample.movie.model.Movie)
ClpSerializer.translateOutput(returnObj);
+ }
+
+ public com.sample.movie.model.Movie createMovie(java.lang.String Name) {
+ Object paramObj0 = ClpSerializer.translateInput(Name);
+
+ if (Name == null) {
+ paramObj0 = new NullWrapper("java.lang.String");
+ }
+
+ Object returnObj = null;
+
+ try {
+ returnObj = _classLoaderProxy.invoke("createMovie",
+ new Object[] { paramObj0 });
+ } catch (Throwable t) {
+ if (t instanceof RuntimeException) {
+ throw (RuntimeException) t;
+ } else {
+ throw new RuntimeException(t.getClass().getName() +
+ " is not a valid exception");
+ }
+ }
+
+ return (com.sample.movie.model.Movie)
ClpSerializer.translateOutput(returnObj);
+ }
+
+ public void deleteMovie(java.lang.String Name)
+ throws com.liferay.portal.PortalException,
+ com.liferay.portal.SystemException {
+ Object paramObj0 = ClpSerializer.translateInput(Name);
+
+ if (Name == null) {
+ paramObj0 = new NullWrapper("java.lang.String");
+ }
+
+ try {
+ _classLoaderProxy.invoke("deleteMovie", new Object[] { paramObj0
});
+ } catch (Throwable t) {
+ if (t instanceof com.liferay.portal.PortalException) {
+ throw (com.liferay.portal.PortalException) t;
+ }
+
+ if (t instanceof com.liferay.portal.SystemException) {
+ throw (com.liferay.portal.SystemException) t;
+ }
+
+ if (t instanceof RuntimeException) {
+ throw (RuntimeException) t;
+ } else {
+ throw new RuntimeException(t.getClass().getName() +
+ " is not a valid exception");
+ }
+ }
+ }
+
+ public void deleteMovie(com.sample.movie.model.Movie movie)
+ throws com.liferay.portal.SystemException {
+ Object paramObj0 = ClpSerializer.translateInput(movie);
+
+ if (movie == null) {
+ paramObj0 = new NullWrapper("com.sample.movie.model.Movie");
+ }
+
+ try {
+ _classLoaderProxy.invoke("deleteMovie", new Object[] { paramObj0
});
+ } catch (Throwable t) {
+ if (t instanceof com.liferay.portal.SystemException) {
+ throw (com.liferay.portal.SystemException) t;
+ }
+
+ if (t instanceof RuntimeException) {
+ throw (RuntimeException) t;
+ } else {
+ throw new RuntimeException(t.getClass().getName() +
+ " is not a valid exception");
+ }
+ }
+ }
+
+ public java.util.List<Object> dynamicQuery(
+ com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
+ throws com.liferay.portal.SystemException {
+ Object paramObj0 = ClpSerializer.translateInput(dynamicQuery);
+
+ if (dynamicQuery == null) {
+ paramObj0 = new NullWrapper(
+ "com.liferay.portal.kernel.dao.orm.DynamicQuery");
+ }
+
+ Object returnObj = null;
+
+ try {
+ returnObj = _classLoaderProxy.invoke("dynamicQuery",
+ new Object[] { paramObj0 });
+ } catch (Throwable t) {
+ if (t instanceof com.liferay.portal.SystemException) {
+ throw (com.liferay.portal.SystemException) t;
+ }
+
+ if (t instanceof RuntimeException) {
+ throw (RuntimeException) t;
+ } else {
+ throw new RuntimeException(t.getClass().getName() +
+ " is not a valid exception");
+ }
+ }
+
+ return (java.util.List<Object>)
ClpSerializer.translateOutput(returnObj);
+ }
+
+ public java.util.List<Object> dynamicQuery(
+ com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int
start,
+ int end) throws com.liferay.portal.SystemException {
+ Object paramObj0 = ClpSerializer.translateInput(dynamicQuery);
+
+ if (dynamicQuery == null) {
+ paramObj0 = new NullWrapper(
+ "com.liferay.portal.kernel.dao.orm.DynamicQuery");
+ }
+
+ Object paramObj1 = new IntegerWrapper(start);
+
+ Object paramObj2 = new IntegerWrapper(end);
+
+ Object returnObj = null;
+
+ try {
+ returnObj = _classLoaderProxy.invoke("dynamicQuery",
+ new Object[] { paramObj0, paramObj1, paramObj2 });
+ } catch (Throwable t) {
+ if (t instanceof com.liferay.portal.SystemException) {
+ throw (com.liferay.portal.SystemException) t;
+ }
+
+ if (t instanceof RuntimeException) {
+ throw (RuntimeException) t;
+ } else {
+ throw new RuntimeException(t.getClass().getName() +
+ " is not a valid exception");
+ }
+ }
+
+ return (java.util.List<Object>)
ClpSerializer.translateOutput(returnObj);
+ }
+
+ public com.sample.movie.model.Movie getMovie(java.lang.String Name)
+ throws com.liferay.portal.PortalException,
+ com.liferay.portal.SystemException {
+ Object paramObj0 = ClpSerializer.translateInput(Name);
+
+ if (Name == null) {
+ paramObj0 = new NullWrapper("java.lang.String");
+ }
+
+ Object returnObj = null;
+
+ try {
+ returnObj = _classLoaderProxy.invoke("getMovie",
+ new Object[] { paramObj0 });
+ } catch (Throwable t) {
+ if (t instanceof com.liferay.portal.PortalException) {
+ throw (com.liferay.portal.PortalException) t;
+ }
+
+ if (t instanceof com.liferay.portal.SystemException) {
+ throw (com.liferay.portal.SystemException) t;
+ }
+
+ if (t instanceof RuntimeException) {
+ throw (RuntimeException) t;
+ } else {
+ throw new RuntimeException(t.getClass().getName() +
+ " is not a valid exception");
+ }
+ }
+
+ return (com.sample.movie.model.Movie)
ClpSerializer.translateOutput(returnObj);
+ }
+
+ public java.util.List<com.sample.movie.model.Movie> getMovies(int start,
+ int end) throws com.liferay.portal.SystemException {
+ Object paramObj0 = new IntegerWrapper(start);
+
+ Object paramObj1 = new IntegerWrapper(end);
+
+ Object returnObj = null;
+
+ try {
+ returnObj = _classLoaderProxy.invoke("getMovies",
+ new Object[] { paramObj0, paramObj1 });
+ } catch (Throwable t) {
+ if (t instanceof com.liferay.portal.SystemException) {
+ throw (com.liferay.portal.SystemException) t;
+ }
+
+ if (t instanceof RuntimeException) {
+ throw (RuntimeException) t;
+ } else {
+ throw new RuntimeException(t.getClass().getName() +
+ " is not a valid exception");
+ }
+ }
+
+ return (java.util.List<com.sample.movie.model.Movie>)
ClpSerializer.translateOutput(returnObj);
+ }
+
+ public int getMoviesCount() throws com.liferay.portal.SystemException {
+ Object returnObj = null;
+
+ try {
+ returnObj = _classLoaderProxy.invoke("getMoviesCount", new
Object[0]);
+ } catch (Throwable t) {
+ if (t instanceof com.liferay.portal.SystemException) {
+ throw (com.liferay.portal.SystemException) t;
+ }
+
+ if (t instanceof RuntimeException) {
+ throw (RuntimeException) t;
+ } else {
+ throw new RuntimeException(t.getClass().getName() +
+ " is not a valid exception");
+ }
+ }
+
+ return ((Integer) returnObj).intValue();
+ }
+
+ public com.sample.movie.model.Movie updateMovie(
+ com.sample.movie.model.Movie movie)
+ throws com.liferay.portal.SystemException {
+ Object paramObj0 = ClpSerializer.translateInput(movie);
+
+ if (movie == null) {
+ paramObj0 = new NullWrapper("com.sample.movie.model.Movie");
+ }
+
+ Object returnObj = null;
+
+ try {
+ returnObj = _classLoaderProxy.invoke("updateMovie",
+ new Object[] { paramObj0 });
+ } catch (Throwable t) {
+ if (t instanceof com.liferay.portal.SystemException) {
+ throw (com.liferay.portal.SystemException) t;
+ }
+
+ if (t instanceof RuntimeException) {
+ throw (RuntimeException) t;
+ } else {
+ throw new RuntimeException(t.getClass().getName() +
+ " is not a valid exception");
+ }
+ }
+
+ return (com.sample.movie.model.Movie)
ClpSerializer.translateOutput(returnObj);
+ }
+
+ public java.util.Collection<com.sample.movie.model.Movie> getMovies() {
+ Object returnObj = null;
+
+ try {
+ returnObj = _classLoaderProxy.invoke("getMovies", new Object[0]);
+ } catch (Throwable t) {
+ if (t instanceof RuntimeException) {
+ throw (RuntimeException) t;
+ } else {
+ throw new RuntimeException(t.getClass().getName() +
+ " is not a valid exception");
+ }
+ }
+
+ return (java.util.Collection<com.sample.movie.model.Movie>)
ClpSerializer.translateOutput(returnObj);
+ }
+}
Index:
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/MovieLocalService.java
===================================================================
---
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/MovieLocalService.java
(revision 0)
+++
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/MovieLocalService.java
(revision 33)
@@ -0,0 +1,76 @@
+package com.sample.movie.service;
+
+import com.liferay.portal.PortalException;
+import com.liferay.portal.SystemException;
+import com.liferay.portal.kernel.annotation.Propagation;
+import com.liferay.portal.kernel.annotation.Transactional;
+
+
+/**
+ * <a href="MovieLocalService.java.html"><b><i>View Source</i></b></a>
+ *
+ * <p>
+ * ServiceBuilder generated this class. Modifications in this class will be
+ * overwritten the next time is generated.
+ * </p>
+ *
+ * <p>
+ * This interface defines the service. The default implementation is
+ * <code>com.sample.movie.service.impl.MovieLocalServiceImpl</code>.
+ * Modify methods in that class and rerun ServiceBuilder to populate this
class
+ * and all other generated classes.
+ * </p>
+ *
+ * <p>
+ * This is a local service. Methods of this service will not have security
checks based on the propagated JAAS credentials because this service can only
be accessed from within the same VM.
+ * </p>
+ *
+ * @author Brian Wing Shun Chan
+ *
+ * @see com.sample.movie.service.MovieLocalServiceUtil
+ *
+ */
+@Transactional(rollbackFor = {
+ PortalException.class, SystemException.class}
+)
+public interface MovieLocalService {
+ public com.sample.movie.model.Movie addMovie(
+ com.sample.movie.model.Movie movie)
+ throws com.liferay.portal.SystemException;
+
+ public com.sample.movie.model.Movie createMovie(java.lang.String Name);
+
+ public void deleteMovie(java.lang.String Name)
+ throws com.liferay.portal.SystemException,
+ com.liferay.portal.PortalException;
+
+ public void deleteMovie(com.sample.movie.model.Movie movie)
+ throws com.liferay.portal.SystemException;
+
+ public java.util.List<Object> dynamicQuery(
+ com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
+ throws com.liferay.portal.SystemException;
+
+ public java.util.List<Object> dynamicQuery(
+ com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int
start,
+ int end) throws com.liferay.portal.SystemException;
+
+ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
+ public com.sample.movie.model.Movie getMovie(java.lang.String Name)
+ throws com.liferay.portal.SystemException,
+ com.liferay.portal.PortalException;
+
+ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
+ public java.util.List<com.sample.movie.model.Movie> getMovies(int start,
+ int end) throws com.liferay.portal.SystemException;
+
+ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
+ public int getMoviesCount() throws com.liferay.portal.SystemException;
+
+ public com.sample.movie.model.Movie updateMovie(
+ com.sample.movie.model.Movie movie)
+ throws com.liferay.portal.SystemException;
+
+ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
+ public java.util.Collection<com.sample.movie.model.Movie> getMovies();
+}
Index:
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/MovieServiceUtil.java
===================================================================
---
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/MovieServiceUtil.java
(revision 0)
+++
WSSL2-training/WebSpaceService/service/src/com/sample/movie/service/MovieServiceUtil.java
(revision 33)
@@ -0,0 +1,52 @@
+package com.sample.movie.service;
+
+import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil;
+import com.liferay.portal.kernel.util.ClassLoaderProxy;
+
+
+/**
+ * <a href="MovieServiceUtil.java.html"><b><i>View Source</i></b></a>
+ *
+ * <p>
+ * ServiceBuilder generated this class. Modifications in this class will be
+ * overwritten the next time is generated.
+ * </p>
+ *
+ * <p>
+ * This class provides static methods for the
+ * <code>com.sample.movie.service.MovieService</code>
+ * bean. The static methods of this class calls the same methods of the bean
+ * instance. It's convenient to be able to just write one line to call a
method
+ * on a bean instead of writing a lookup call and a method call.
+ * </p>
+ *
+ * @author Brian Wing Shun Chan
+ *
+ * @see com.sample.movie.service.MovieService
+ *
+ */
+public class MovieServiceUtil {
+ private static MovieService _service;
+
+ public static MovieService getService() {
+ if (_service == null) {
+ Object obj = PortletBeanLocatorUtil.locate("MovieApplication",
+ MovieServiceUtil.class.getName());
+ ClassLoader portletClassLoader = (ClassLoader)
PortletBeanLocatorUtil.locate("MovieApplication",
+ "portletClassLoader");
+
+ ClassLoaderProxy classLoaderProxy = new ClassLoaderProxy(obj,
+ portletClassLoader);
+
+ _service = new MovieServiceClp(classLoaderProxy);
+
+ ClpSerializer.setClassLoader(portletClassLoader);
+ }
+
+ return _service;
+ }
+
+ public void setService(MovieService service) {
+ _service = service;
+ }
+}
Index:
WSSL2-training/WebSpaceService/service/src/com/sample/movie/NoSuchMovieException.java
===================================================================
---
WSSL2-training/WebSpaceService/service/src/com/sample/movie/NoSuchMovieException.java
(revision 0)
+++
WSSL2-training/WebSpaceService/service/src/com/sample/movie/NoSuchMovieException.java
(revision 33)
@@ -0,0 +1,51 @@
+/**
+ * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
copy
+ * of this software and associated documentation files (the "Software"), to
deal
+ * in the Software without restriction, including without limitation the
rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE
+ * SOFTWARE.
+ */
+
+package com.sample.movie;
+
+import com.liferay.portal.PortalException;
+
+/**
+ * <a href="NoSuchMovieException.java.html"><b><i>View Source</i></b></a>
+ *
+ * @author Brian Wing Shun Chan
+ *
+ */
+public class NoSuchMovieException extends PortalException {
+
+ public NoSuchMovieException() {
+ super();
+ }
+
+ public NoSuchMovieException(String msg) {
+ super(msg);
+ }
+
+ public NoSuchMovieException(String msg, Throwable cause) {
+ super(msg, cause);
+ }
+
+ public NoSuchMovieException(Throwable cause) {
+ super(cause);
+ }
+
+}
\ No newline at end of file
Index:
WSSL2-training/WebSpaceService/service/classes/com/sample/movie/model/MovieClp.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on:
WSSL2-training/WebSpaceService/service/classes/com/sample/movie/model/MovieClp.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index:
WSSL2-training/WebSpaceService/service/classes/com/sample/movie/model/Movie.class
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on:
WSSL2-training/WebSpaceService/service/classes/com/sample/movie/model/Movie.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-s
[truncated due to length]
|
[sepia~sepia-svn-repository:33] Import v1.0 |
patriceG | 12/07/2009 |





