/**
 * JBoss, Home of Professional Open Source.
 * Copyright 2014 Red Hat, Inc., and individual contributors
 * as indicated by the @author tags.
 *
 * 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
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * 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.
 */
package org.jboss.pnc.model;

import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.ForeignKey;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * @author <a href="mailto:matejonnet@gmail.com">Matej Lazar</a>
 */
@ToString
@Builder
@Entity
@Table(indexes = {@Index(name = "idx_buildrecordpushresult_buildrecord", columnList = "buildRecord_id")})
public class BuildRecordPushResult implements GenericEntity<Integer> {

    @Id
    @Getter
    @Setter
    private Integer id;

    @JoinColumn(foreignKey = @ForeignKey(name = "fk_buildrecordpushresult_buildrecord"))
    @ManyToOne
    @Getter
    @Setter
    private BuildRecord buildRecord;

    @Getter
    @Setter
    @Enumerated(EnumType.STRING)
    private BuildRecordPushResult.Status status;

    @Getter
    @Setter
    private String log;

    /**
     * build id assigned by brew
     */
    @Getter
    @Setter
    private Integer brewBuildId;

    /**
     * link to brew
     */
    @Getter
    @Setter
    private String brewBuildUrl;

    public enum Status {
        SUCCESS, FAILED, SYSTEM_ERROR, CANCELED;
    }
}

@@ -817,16 +817,55 @@
 oString;
+%0Aimport org.hibernate.annotations.Type;
 %0A%0Aimport
@@ -1000,16 +1000,98 @@
 ignKey;%0A
+import javax.persistence.GeneratedValue;%0Aimport javax.persistence.GenerationType;%0A
 import j
@@ -1180,16 +1180,46 @@
 Column;%0A
+import javax.persistence.Lob;%0A
 import j
@@ -1246,16 +1246,60 @@
 yToOne;%0A
+import javax.persistence.SequenceGenerator;%0A
 import j
@@ -1609,11 +1609,272 @@
     
-@Id
+public static final String SEQUENCE_NAME = %22build_record_push_result_id_seq%22;%0A%0A    @Id%0A    @SequenceGenerator(name = SEQUENCE_NAME, sequenceName = SEQUENCE_NAME, allocationSize = 1)%0A    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SEQUENCE_NAME)
 %0A   
@@ -2158,30 +2158,8 @@
 ate 
-BuildRecordPushResult.
 Stat
@@ -2186,32 +2186,91 @@
 ter%0A    @Setter%0A
+    @Lob%0A    @Type(type = %22org.hibernate.type.StringType%22)%0A
     private Stri

Update push result record.