[Hibernate] help creating an ID Generator

2006-02-28 Thread Charles Harvey III

Hello.
I am trying to find a decent reference on the archives of how to create
my own ID generator.  I have to create a string based on a date formula
with some other parameters.

I was hoping someone could point me in the right direction for generating
a funny looking string for an ID.  Do I create a Type first?  Which 
Generator

class/interface should I extend/implement?

I'll keep reading the archives, and hopefully I'll have figured it out 
before

the answer comes back. ;)


Charlie



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Re: [Hibernate] help creating an ID Generator

2006-02-28 Thread Charles Harvey III

Ok.  This makes sense.  That was what I was getting from that page as well.
How about this though...  Part of the string that I am creating as the ID
is part of the request I am making in the browser.

06-Q1-105-55-01

YEAR - QUARTER - PASSED_VALUE - DAY_OF_YEAR - REQUEST_#_OF_DAY

How do I pass a value as one of the parameters?


id name=id type=string column=po_number
   generator class=com.alloy.finance.PONumberGenerator
   param name=budgetCode/param
   /generator
/id

Is that possible?  If so, I would love to know how.  :)



Charlie



hamed shayan said the following on 2/28/2006 12:24 PM:

Dear Charlie,

Look here:


5.1.4.1 http://5.1.4.1. Generator

The optional generator child element names a Java class used to 
generate unique identifiers for instances of the persistent class. If 
any parameters are required to configure or initialize the generator 
instance, they are passed using the param element.


id name=id type=long column=cat_id
generator class=org.hibernate.id.TableHiLoGenerator
param name=tableuid_table/param

param name=columnnext_hi_value_column/param
/generator
/id

All generators implement the interface 
org.hibernate.id.IdentifierGenerator. This is a very simple interface; 
some applications may choose to provide their own specialized 
implementations. However, Hibernate provides a range of built-in 
implementations.


You can find the above passage in here : 
http://www.hibernate.org/hib_docs/v3/reference/en/html/mapping.html


Sincerely Yours,
Hamed Shayan



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Re: [Hibernate] help creating an ID Generator

2006-02-28 Thread Emmanuel Bernard

Guys this is the dev mailing list, not the user forum.

Charles Harvey III wrote:
Ok.  This makes sense.  That was what I was getting from that page as 
well.

How about this though...  Part of the string that I am creating as the ID
is part of the request I am making in the browser.

06-Q1-105-55-01

YEAR - QUARTER - PASSED_VALUE - DAY_OF_YEAR - REQUEST_#_OF_DAY

How do I pass a value as one of the parameters?


id name=id type=string column=po_number
   generator class=com.alloy.finance.PONumberGenerator
   param name=budgetCode/param
   /generator
/id

Is that possible?  If so, I would love to know how.  :)



Charlie



hamed shayan said the following on 2/28/2006 12:24 PM:

Dear Charlie,

Look here:


5.1.4.1 http://5.1.4.1. Generator

The optional generator child element names a Java class used to 
generate unique identifiers for instances of the persistent class. If 
any parameters are required to configure or initialize the generator 
instance, they are passed using the param element.


id name=id type=long column=cat_id
generator class=org.hibernate.id.TableHiLoGenerator
param name=tableuid_table/param

param name=columnnext_hi_value_column/param
/generator
/id

All generators implement the interface 
org.hibernate.id.IdentifierGenerator. This is a very simple 
interface; some applications may choose to provide their own 
specialized implementations. However, Hibernate provides a range of 
built-in implementations.


You can find the above passage in here : 
http://www.hibernate.org/hib_docs/v3/reference/en/html/mapping.html


Sincerely Yours,
Hamed Shayan



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting 
language
that extends applications into web and mobile media. Attend the live 
webcast
and join the prime developer group breaking into this new coding 
territory!

http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel






---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


[Hibernate] Hibernate 3.2 alpha1 released

2006-02-28 Thread Steve Ebersole
Hibernate 3.2 alpha1 has just been released.  The distribution can be
obtained at
http://sourceforge.net/project/showfiles.php?group_id=40712package_id=1
27784release_id=397557

There are some significant enhancements with this release so be sure to
check the change-log.  The biggest changes included pluggability of
byte-code providers (cglib and javassist now supported) and integration
with JBossCache's new optimistic locking features; in addition, 3.2 will
be the basis for EJB3 persistence support moving forward, so work is
being wrapped up there to ensure full compliance with the latest spec.



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


[Hibernate] setfirstResult() / setMaxResult() and collection fetching

2006-02-28 Thread Emmanuel Bernard
Wouldn't it be possible to implement that through a scrollable resultset 
when a collection fetch is involved. This would limit the amount of data 
in memory.




---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


RE: [Hibernate] setfirstResult() / setMaxResult() and collection fetching

2006-02-28 Thread Steve Ebersole
You could, and actually most of the needed code is already in place due
to the feature of scrolling collection fetches.  The main problem there
is that it *only* works (in terms of what you are trying to achieve)
provided you know for certain that the results are ordered correctly
(namely, they must be ordered by the owning entity primarily such that
all possible rows for a given owner are contiguous within the result
set).  And what about polymorphic queries?

The cleanest solution is to fall back to subselect fetching in these
cases; which, of course, has its own implementation difficulties.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Emmanuel Bernard
Sent: Tuesday, February 28, 2006 7:12 PM
To: Hibernate development
Subject: [Hibernate] setfirstResult() / setMaxResult() and collection
fetching

Wouldn't it be possible to implement that through a scrollable resultset

when a collection fetch is involved. This would limit the amount of data

in memory.



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting
language
that extends applications into web and mobile media. Attend the live
webcast
and join the prime developer group breaking into this new coding
territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel