-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Hibernate will support webrowsets
PostPosted: Sun Jan 08, 2006 6:07 am 
Newbie

Joined: Tue Dec 13, 2005 9:16 am
Posts: 6
Location: secundrabad
Need help with Hibernate? Read this first

In hibernate webrowsets can be useful or not. right know i am doing project on hibernate .i am follwing hibernate in action book. in this we donot mention about webrowsete i want clear clarification about webrowsets can be useful in hibernate or anyother alternativies is there if there ple tell me. Right know i am doing project on hibernate.in this hibernate action donot mention about security i want more information about the sequrity plese telll me in datails any examples plese provide me. how to develop pagination concept in hibernate. and also how to develop programatic serurity.i am using hibernate 3.o struts 1.1 oracle 9i here i am putting my example on hibernate for crud oeration but in yhis example i developed inser,update,and delete i didnot develop list i anyone knows plese help me and also telll hoe to develop beteer way.and also in this example i hardcoded for one table but i want dynamically when i select table on gui according to that crud operations must be done.
And alsio in this example i didnot developed paginaton concept plese if y know tellll me how to develop

my id satyanarayana@ebaseinteractive.com
my mobile +91 9866636789

first ideveloped one interface


package com.ebaseindia.valuesys.handling_data.tables.actions;
public class Table
{
public void setName(String name){
this.name=name;
}
public String getName(){
return name;
}
public void setNumber(int number){
this.number=number;
}
public int getNumber(){
return number;
}
private String name;
int number;
}


next this interface is developed u

package com.ebaseindia.valuesys.handling_data.tables.actions;
public class Table
{
public void setName(String name){
this.name=name;
}
public String getName(){
return name;
}
public void setNumber(int number){
this.number=number;
}
public int getNumber(){
return number;
}
private String name;
int number;
}

i hard coded for one table thats way i written


package com.ebaseindia.valuesys.handling_data.tables.actions;
public class Table
{
public void setName(String name){
this.name=name;
}
public String getName(){
return name;
}
public void setNumber(int number){
this.number=number;
}
public int getNumber(){
return number;
}
private String name;
int number;
}


i developed select table Action class


package com.ebaseindia.valuesys.handling_data.tables.actions;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts.actions.DispatchAction;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.ebaseindia.valuesys.handling_data.tables.ISelectTable;
import com.ebaseindia.valuesys.handling_data.tables.forms.InsertTableForm;
import com.ebaseindia.valuesys.handling_data.tables.forms.SelectTableForm;

public class SelectTableAction extends DispatchAction
{
public ActionForward insert(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {

ActionErrors errors = new ActionErrors(); // for errors
ActionForward forward = new ActionForward(); // return value
String target="fail";

System.out.println("before try");

try{

SelectTableForm stForm=(SelectTableForm)form;
HttpSession session = request.getSession();
String tableName = stForm.getTableName();
session.setAttribute("tableName",tableName);

ISelectTable ist=new SelectTableImpl();
java.util.List tableFields=ist.getRows();
int max=0;
for(int i=0;i<tableFields.size();i++){
if( max<((Table)tableFields.get(i)).getNumber())
max=((Table)tableFields.get(i)).getNumber();
}
session.setAttribute("id",new Integer(max+1));
//session.setAttribute("tableFields",tableFields);

return mapping.findForward("insert");

}catch(Exception e){
System.out.println("in cathc");
e.printStackTrace();
errors.add("error",new ActionError("errorID"));
}
forward=new ActionForward(target);
return forward;
}
public ActionForward update(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
ActionErrors errors = new ActionErrors(); // for errors
ActionForward forward = new ActionForward(); // return value
String target="fail";

System.out.println("before try");
try{

SelectTableForm stForm=(SelectTableForm)form;
HttpSession session = request.getSession();
String tableName = stForm.getTableName();
session.setAttribute("tableName",tableName);

ISelectTable ist=new SelectTableImpl();
java.util.List tableFields=ist.getRows();
session.setAttribute("tableFields",tableFields);

return mapping.findForward("update");

}catch(Exception e){
System.out.println("in cathc");
e.printStackTrace();
errors.add("error",new ActionError("errorID"));
}
forward=new ActionForward(target);
return forward;

}
public ActionForward delete(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {

ActionErrors errors = new ActionErrors(); // for errors
ActionForward forward = new ActionForward(); // return value
String target="fail";

System.out.println("before try");

try{

SelectTableForm stForm=(SelectTableForm)form;
HttpSession session = request.getSession();
String tableName = stForm.getTableName();
session.setAttribute("tableName",tableName);

ISelectTable ist=new SelectTableImpl();
java.util.List tableFields=ist.getRows();
session.setAttribute("tableFields",tableFields);

return mapping.findForward("delete");

}catch(Exception e){
System.out.println("in cathc");
e.printStackTrace();
errors.add("error",new ActionError("errorID"));
}
forward=new ActionForward(target);
return forward;
}


}


remaining i developed corresponding Acionforms And action class(INsert,update, delete)
correesponding jsps any one knows tel me





http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3.0

Mapping documents:3.0

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:oracle 9i

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:

Code:
Code:
Code:
Code:
[quote][/quote]


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 08, 2006 8:01 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
If your posting (or a question you are referring to) was not answered by anybody, the possible reasons are:

- http://www.hibernate.org/ForumMailingli ... AskForHelp
- You did not submit enough information
- Nobody knows the answer or has the free time to answer

What you can do now:

- Do the things listed in After Posting
- Add missing and/or more information
- Consider commercial support for guaranteed expert response times

This is a high-traffic forum run by volunteers with hundreds of postings made every day. The community works because people try to help others in their free time. Nobody is paid for this service or has to pay.

You should not expect a timely response and you should not rely on a public community forum for critical cases.

All community members should respect the rules of this forum and treat others like they would prefer to be treated.

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.