Fórumok
Service Builder
Toshiro Mifune, módosítva 9 év-val korábban
Service Builder
Regular Member Bejegyzések: 238 Csatlakozás dátuma: 2014.12.11. Legújabb bejegyzések
Hi,
I followed this documentation and everything seems to be ok ...
1. service builder seems to be build ok
2. method addBook was added into BookLocalServiceImpl class
3. and finally I add this lines to docroot/WEB-INF/service/com/sample/portlet/library/*.java
if it is OK where can I find this database ... how can I get data from this database? I dont know what to do now ...
I followed this documentation and everything seems to be ok ...
1. service builder seems to be build ok
2. method addBook was added into BookLocalServiceImpl class
3. and finally I add this lines to docroot/WEB-INF/service/com/sample/portlet/library/*.java
BookLocalServiceUtil.addBook(userId, "Harry Potter I.");
if it is OK where can I find this database ... how can I get data from this database? I dont know what to do now ...
David H Nebinger, módosítva 9 év-val korábban
RE: Service Builder
Liferay Legend Bejegyzések: 14919 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
There will be a new table in the database named like Books_Book or something.
No you should not look at the database, you should only use the methods defined in BookLocalServiceUtil. These include methods for getting a book, searching for books, updating books, and deleting books.
No you should not look at the database, you should only use the methods defined in BookLocalServiceUtil. These include methods for getting a book, searching for books, updating books, and deleting books.
Olaf Kock, módosítva 9 év-val korábban
RE: Service Builder
Liferay Legend Bejegyzések: 6403 Csatlakozás dátuma: 2008.09.23. Legújabb bejegyzések
Just adding a tiny bit of detail to David's information: The name of your table will typically be a combination of the "Namespace" and "Entity" name from your service.xml - unless you specifically override it, but in that case you already know the name anyway...
Toshiro Mifune, módosítva 9 év-val korábban
RE: Service Builder
Regular Member Bejegyzések: 238 Csatlakozás dátuma: 2014.12.11. Legújabb bejegyzések
Thak you. Can you tell me some some command and where should I put it?
namespace: Library
entity: Book
Thanks
namespace: Library
entity: Book
Thanks
Toshiro Mifune, módosítva 9 év-val korábban
RE: Service Builder
Regular Member Bejegyzések: 238 Csatlakozás dátuma: 2014.12.11. Legújabb bejegyzések
OK I solved it ... I hope :-) ... I run my firsty commant
in JSP file.
<% out.println(BookLocalServiceUtil.getBooksCount()); %>
in JSP file.
Toshiro Mifune, módosítva 9 év-val korábban
RE: Service Builder
Regular Member Bejegyzések: 238 Csatlakozás dátuma: 2014.12.11. Legújabb bejegyzések
BUT .... I run a command which can tell me number of books. This ...
Which is for now zero because I can not run a command for adding a book. This ...
... do you know why??? And how to solve this problem?
Thanks
BookLocalServiceUtil.getBooksCount()
Which is for now zero because I can not run a command for adding a book. This ...
BookLocalServiceUtil.addBook(11502,"book 1")
... do you know why??? And how to solve this problem?
Thanks
Toshiro Mifune, módosítva 9 év-val korábban
RE: Service Builder
Regular Member Bejegyzések: 238 Csatlakozás dátuma: 2014.12.11. Legújabb bejegyzések
OK so this is my fault ... in the addBook should be a userID ... not bookID as I thought ... BUT thanks you all for your answers !!!
Aditya Bhardwaj, módosítva 9 év-val korábban
RE: Service Builder
Junior Member Bejegyzések: 78 Csatlakozás dátuma: 2015.01.08. Legújabb bejegyzésekToshiro Mifune:
Thak you. Can you tell me some some command and where should I put it?
namespace: Library
entity: Book
Thanks
Hi,
For Detail description of each tag of service.xml you can see Service.xml in Detail
If any other problem you can comment.
David H Nebinger, módosítva 9 év-val korábban
RE: Service Builder
Liferay Legend Bejegyzések: 14919 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
Not the best description of the service.xml file.
You're better served reading the highly-commented DTD document that is in the definitions folder in a Liferay source download.
You're better served reading the highly-commented DTD document that is in the definitions folder in a Liferay source download.
Jack Bakker, módosítva 9 év-val korábban
RE: Service Builder
Liferay Master Bejegyzések: 978 Csatlakozás dátuma: 2010.01.03. Legújabb bejegyzésekDavid H Nebinger:
Not the best description of the service.xml file.
You're better served reading the highly-commented DTD document that is in the definitions folder in a Liferay source download.
And, as a companion document to the highly-commented DTD, there is much detailed info on liferay-service-builder_6_2_0.dtd here: http://docs.liferay.com/portal/6.2/definitions