CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Java

 custom insert/update/delete in java

Print topic Send  topic

Author Message
mazzam

Posts: 3
Posted: 03/23/2004, 12:22 AM

Is it possbile to call java functions in custom insert/update/delete instead of db db functions?!?
If so how?
I'm using ccs 2.2.3.57, servlet + templates and oracle DB.
Thanks
Mauro
View profile  Send private message
ignat


Posts: 55
Posted: 03/23/2004, 12:27 AM

Yes. It's possible. You can utilize Before Insert/Update/Delete events
to do what you want to do and then setAllowInsert etc.. to false,
so that original operation is not executed. Also take a look at
BeforeExecute.. and AfterExecute.. events.

Regards,
Ignat.
View profile  Send private message
Mauro
Posted: 03/23/2004, 12:34 AM

Thank's a lot, I'll look at it.
My intention is to write businnes logic in java with eclipse or something like that (to be indipendent from the db) and then use it inside codecharge. Do you think this is the right way?!?
Thank's again
Mauro
Anton
Posted: 03/23/2004, 2:19 AM

I’m interested in this also. Currently I use a blank include page with the business logic classes in the pages event handler - quick and dirty to edit in CCS but static properties and methods are not possible. I have the blank page included in my footer and my footer is in most pages. This gives me a single point of change in the future.

When I have settled all the code I think that I will take the code out and create a session object out of it. I should be able to just 'unplug' the code from the footer and invoke the same class object from the session. I could even just re-hook the code from the class files in the footers include page and just test for / create and invoke my new session based objects.

The extra memory load on TomCat being the business objects per user logged in / not timed out user - ...significant?, I suspect not for me.

Very quick and dirty but effective to getting me going. Performance is not critical until I get stable code I can plug into the users session.

I think that this may be the best way forward for me as the business logic objects are created once upon the session of the user who will be using the system all day. Being session based then synchronization per user is not an issue - but is it?

I suppose that you could say I will have to be careful of making the business session object dirty after each call (no properties of class changed) but suspect that simultaneous invocation by the same user at the same time is not possible???

This should be OK as I just use the event signatures like beforeSelect(Event e) or beforeExecuteInsert(DataObjectEvent e) etc. I then use my footers created business class object to use these events like: myBusinessObj.doSomething(e). This is still a bit hack as I could have created a business object to be a listener of the grid/record and just simply add it into the registered listeners so that it can respond it sees fit (no hack coding to push the event on into my business object) - but at least I am half way there!

An effective development solution for me because the business objects can be tested in depth but will this strategy have any nasty consequences?

Has anyone else tried this?

Anton
mauro
Posted: 03/23/2004, 2:54 AM

really interesting anton!!!
I'll try this...
eserver221
Posted: 04/25/2005, 8:28 AM

Quote :
I’m interested in this also. Currently I use a blank include page with the business logic classes in the pages event handler - quick and dirty to edit in CCS but static properties and methods are not possible. I have the blank page included in my footer and my footer is in most pages. This gives me a single point of change in the future.
Would you please show me the sample code ? I'd like to how to create this very include page.

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.