I have a legacy database, which I am using EJB3 to model. The database is in quite a poor shape, and we have certain unusual restrictions on how we insert into the DB. Now I want to model the database in a hierarchy that fits in with the DB strucuture, but I want to be able to manually insert each entity individually without the persiste...
Hi I have a Java enum and I want serialize a variable containing an enum value back and forth from XML for persistence. My enum is defined like this...
public enum e_Type
{
e_Unknown,
e_Categoric,
e_Numeric
}
My variable is declared like this...
private e_Type type;
I want it to go into an XML tag like this...
<type>value</typ...
Is it possible to use hibernate as Glassfish's persistence provider and if so HOW?
...
I'm asking on opinion about implementing framework that emulates ado.net in java (data tables, data sets etc). Idea is to avoid writing domain objects since they are, so far, just used to transport data from server to client and back, with no particular business methods inside them. Main goal is to speed up development time.
Could i bene...
Is there anyway to do a postback with a new querystring that doesn't reset all of the controls on a page to their defaults? I have a page named "default.aspx" with several checkbox controls on it. I can check them all I want and they will remain persistent (meaning they keep their checked or unchecked state) on postbacks to "default.aspx...
I have an EnumSet that I thought it would be good to map into a series of boolean columns. This will make it easy to inspect using SQL tools and also resilient to changes to the available enum values. However, I don't really want to hand-write all the getters and setters for this.
Does anyone have a clever solution using some kind of ...
I have a PHP application where I would like to certain objects to persist in the following manner:
The object must not exist in the $_SESSION. Separate web browser windows must control separate instances of the object.
The end-user must not be able to modify the object by changing the content of the $_REQUEST variable by hand (if this...
I'm toying with the idea to write another framework to make it easier to develop "bread'n'butter" applications (like create a class with N fields, get an editor for that for free plus the DB persistence).
All data models can be converted into the Entity-Attribute-Value form:
TYPE VARCHAR(32)
ID LONG INT
NAME VARCHAR(32)
VALUE VARCHAR(6...
If users view documents on my website (for example a pdf file that represents some confidential information), is there anyway I can prevent them from saving the document locally?
...
I need to store some data that follows the simple pattern of mapping an "id" to a full table (with multiple rows) of several columns (i.e. some integer values [u, v, w]). The size of one of these tables would be a couple of KB. Basically what I need is to store a persistent cache of some intermediary results.
This could quite easily be ...
Hi there, I have no idea how to solve this problem without hiring a coder, but figured it may be small enough problem to post here, and relevant enough to others for broader interest.
I'd like to have a "recently viewed pages" div filled by a javascript script which adds the titles and urls of new pages as they are requested by a user t...
Hey guys,
I have a custom object that simply inherits from NSObject. It has 3 members - two floats and an NSDate.
My app is going to have an array with a number of these objects kicking around, and I need to persist it between runs. What is the best way to accomplish this?
I've thought about using the SQLite db, but I'm thinking that ...
I have two tables joined together with entities like this (entities anonymized, and trimmed of irrelevant properties):
Email
- Email_ID
- Title
- Body (hibernate uses a Body_ID field here)
Body
- Body_ID
- Body_Text
I'd like to retrieve all Email entries that do not have an associated Body row (ie, Body_ID is null). What HQL wou...
Hallo everybody,
I'm dealing with a pretty strange situation here. I have developed a State Machine Workflow and it worked just fine until today.
Now, the Sql Workflow Persistence Service does not save the workflow state. There is no any exception, just it does not save the state. The flow is going normally to the Event Driven activity ...
Instead of having database actions scattered in four (osgi) bundles, all doing there slightly different things. I want to create a (simple) OSGi bundle that is responsible for all persistance issues. I feel that this is not as simple as it sounds because of the "unique classloader per bundle" thing.
So what I really would appreciate is ...
Hi everyone:
I need help on this:
im storing object properties in a DataPacket class.
The properties are defined like this
type
TProperty = class
private
FName: string;
public
constructor Create(const AName: string);
property Name: string read FName;
end;
TIntegerProperty = class(TProperty)
private
FValu...
Hi,
I've got 2 entities in JPA: Entry and Comment. Entry contains two collections of Comment objects.
@Entity
public class Entry {
...
@OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL)
@IndexColumn(base = 1, name = "dnr")
private List<Comment> descriptionComments = new ArrayList<Comment>();
@OneToMany(fetch = FetchTy...
Hi all,
I have an EJB3 application which consists of some EJB's for accessing a DB, and exposed via a Session Bean as a web service.
Now there are two things I need to find out:
1) Is there any way I can stop SQL exceptions from causing the web service from throwing a SOAP Fault? The transactions are handled by the container, and curr...
Here is a curiousity question. I have an application that must support both flat files and the database as a place to persist data. I was thinking maybe using a .csv or tab-delimited set of files as input ...
Is it possible to use NHibernate to write to do both persistance tasks?
...
Suppose I have an object like
public class Handle {
private String handle;
public Handle(String name) {
this.handle=name;
}
public String toString() {
return this.handle;
}
}
that is a property of some POJO that I would like to persist with Hibernate. How do I define the mapping for my POJO such tha...