Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright 2010 JBoss Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 import  javax.persistence.Column;
 import  javax.persistence.Entity;
 import  javax.persistence.GeneratedValue;
 import  javax.persistence.GenerationType;
 import  javax.persistence.Id;
 import  javax.persistence.Lob;
 import  javax.persistence.SequenceGenerator;
 import  javax.persistence.Table;
 import  org.kie.internal.task.api.model.InternalContent;
 @SequenceGenerator(name="contentIdSeq", sequenceName="CONTENT_ID_SEQ", allocationSize=1)
 public class ContentImpl implements InternalContent {
     @GeneratedValue(strategy = GenerationType.AUTO, generator="contentIdSeq")
     private Long   id = 0L;;
     private byte[] content;
     public ContentImpl() {
     public ContentImpl(byte[] content) {
         this. = content;
     public void writeExternal(ObjectOutput outthrows IOException {
         out.writeLong );
         out.writeInt. );
         out.write );        
     public void readExternal(ObjectInput inthrows IOException,
                                             ClassNotFoundException {
          = in.readLong();
          = new bytein.readInt() ];
         in.readFully );
     public long getId() {
         return ;
     public void setId(long id) {
         this. = id;
     public byte[] getContent() {
         return ;
     public void setContent(byte[] content) {
         this. = content;
     public int hashCode() {
         final int prime = 31;
         int result = 1;
         result = prime * result + Arrays.hashCode );
         return result;
     public boolean equals(Object obj) {
         if ( this == obj ) return true;
         if ( obj == null ) return false;
         if ( !(obj instanceof ContentImpl) ) return false;
         ContentImpl other = (ContentImplobj;
         if ( !Arrays.equals,
                             other.content ) ) return false;
        return true;
New to GrepCode? Check out our FAQ X