You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Patrick Linskey (JIRA)" <ji...@apache.org> on 2007/02/07 20:28:05 UTC

[jira] Created: (OPENJPA-130) Streaming LOB support

Streaming LOB support
---------------------

                 Key: OPENJPA-130
                 URL: https://issues.apache.org/jira/browse/OPENJPA-130
             Project: OpenJPA
          Issue Type: New Feature
          Components: jdbc, jpa, kernel, datacache
            Reporter: Patrick Linskey


BLOB and CLOB fields can only be mapped in their entirety in OpenJPA. It would be nice to support fields of type java.io.InputStream (for BLOBs) and java.io.Reader (for CLOBs).

The usage pattern could look like so:

@Entity
public class Employee {
    ...
    private InputStream photoStream;

    public void setPhotoStream(InputStream in) {
        photoStream = in;
    }

    public InputStream getPhotoStream() {
        return photoStream;
    }
}

So, when the user wants to provide a stream, she will set the InputStream field, and when the user wants to obtain a stream, she will use the field.

The behavior of such an implementation would be a bit different than how other fields work, in that if the user set the stream and then consumed it within a single transaction, presumably no data would be written out to the database at commit time. But that is the nature of streams.

(FTR, I think that I stole this idea from an email Craig Russell sent out years ago.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OPENJPA-130) Streaming LOB support

Posted by "Patrick Linskey (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12497601 ] 

Patrick Linskey commented on OPENJPA-130:
-----------------------------------------

Ignacio Andreu will be working on this issue for the Google Summer of Code project. It would seem that JIRA only allows me to assign issues to committers, so I'm assigning it to myself to keep it out of the unassigned queue.

> Streaming LOB support
> ---------------------
>
>                 Key: OPENJPA-130
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-130
>             Project: OpenJPA
>          Issue Type: New Feature
>          Components: datacache, jdbc, jpa, kernel
>            Reporter: Patrick Linskey
>         Assigned To: Patrick Linskey
>             Fix For: 1.1.0
>
>
> BLOB and CLOB fields can only be mapped in their entirety in OpenJPA. It would be nice to support fields of type java.io.InputStream (for BLOBs) and java.io.Reader (for CLOBs).
> The usage pattern could look like so:
> @Entity
> public class Employee {
>     ...
>     private InputStream photoStream;
>     public void setPhotoStream(InputStream in) {
>         photoStream = in;
>     }
>     public InputStream getPhotoStream() {
>         return photoStream;
>     }
> }
> So, when the user wants to provide a stream, she will set the InputStream field, and when the user wants to obtain a stream, she will use the field.
> The behavior of such an implementation would be a bit different than how other fields work, in that if the user set the stream and then consumed it within a single transaction, presumably no data would be written out to the database at commit time. But that is the nature of streams.
> (FTR, I think that I stole this idea from an email Craig Russell sent out years ago.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (OPENJPA-130) Streaming LOB support

Posted by "Patrick Linskey (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-130?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Linskey reassigned OPENJPA-130:
---------------------------------------

    Assignee: Patrick Linskey

> Streaming LOB support
> ---------------------
>
>                 Key: OPENJPA-130
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-130
>             Project: OpenJPA
>          Issue Type: New Feature
>          Components: datacache, jdbc, jpa, kernel
>            Reporter: Patrick Linskey
>         Assigned To: Patrick Linskey
>             Fix For: 1.1.0
>
>
> BLOB and CLOB fields can only be mapped in their entirety in OpenJPA. It would be nice to support fields of type java.io.InputStream (for BLOBs) and java.io.Reader (for CLOBs).
> The usage pattern could look like so:
> @Entity
> public class Employee {
>     ...
>     private InputStream photoStream;
>     public void setPhotoStream(InputStream in) {
>         photoStream = in;
>     }
>     public InputStream getPhotoStream() {
>         return photoStream;
>     }
> }
> So, when the user wants to provide a stream, she will set the InputStream field, and when the user wants to obtain a stream, she will use the field.
> The behavior of such an implementation would be a bit different than how other fields work, in that if the user set the stream and then consumed it within a single transaction, presumably no data would be written out to the database at commit time. But that is the nature of streams.
> (FTR, I think that I stole this idea from an email Craig Russell sent out years ago.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.