/**
 * Copyright (C) 2015 Red Hat, Inc. (jbrazdil@redhat.com)
 *
 * 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.causeway.rest;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

public class BrewBuild extends BrewNVR {

    private final Integer id;

    @JsonCreator
    public BrewBuild(@JsonProperty("id")Integer id, @JsonProperty("name")String name, @JsonProperty("version")String version, @JsonProperty("release")String release) {
        this(id, new BrewNVR(name, version, release));
    }

    public BrewBuild(Integer id, BrewNVR nvr) {
        super(nvr.getName(), nvr.getRelease(), nvr.getVersion());
        this.id = id;
    }

    public Integer getId() {
        return id;
    }
}

@@ -897,16 +897,17 @@
 ty(%22id%22)
+ 
 Integer 
@@ -931,16 +931,17 @@
 (%22name%22)
+ 
 String n
@@ -969,16 +969,17 @@
 ersion%22)
+ 
 String v
@@ -1010,16 +1010,17 @@
 elease%22)
+ 
 String r
@@ -1041,28 +1041,13 @@
     
-this(id, new BrewNVR
+super
 (nam
@@ -1066,17 +1066,38 @@
 release)
-)
+;%0A        this.id = id
 ;%0A    %7D%0A
@@ -1153,22 +1153,25 @@
         
-super(
+this(id, 
 nvr.getN
@@ -1188,15 +1188,15 @@
 .get
-Release
+Version
 (), 
@@ -1206,40 +1206,18 @@
 .get
-Version());%0A        this.id = id
+Release())
 ;%0A  

Fix BrewBuild construcor