001 /* 002 * Sonar, open source software quality management tool. 003 * Copyright (C) 2008-2012 SonarSource 004 * mailto:contact AT sonarsource DOT com 005 * 006 * Sonar is free software; you can redistribute it and/or 007 * modify it under the terms of the GNU Lesser General Public 008 * License as published by the Free Software Foundation; either 009 * version 3 of the License, or (at your option) any later version. 010 * 011 * Sonar is distributed in the hope that it will be useful, 012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 014 * Lesser General Public License for more details. 015 * 016 * You should have received a copy of the GNU Lesser General Public 017 * License along with Sonar; if not, write to the Free Software 018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 019 */ 020 package org.sonar.core.purge; 021 022 public final class PurgeSnapshotQuery { 023 private Long id; 024 private Long rootProjectId; 025 private Long rootSnapshotId; 026 private Long resourceId; 027 private String[] scopes; 028 private String[] qualifiers; 029 private String[] status; 030 private Boolean islast; 031 private Boolean notPurged; 032 private Boolean withVersionEvent; 033 034 private PurgeSnapshotQuery() { 035 } 036 037 public static PurgeSnapshotQuery create() { 038 return new PurgeSnapshotQuery(); 039 } 040 041 public Long getId() { 042 return id; 043 } 044 045 public PurgeSnapshotQuery setId(Long l) { 046 this.id = l; 047 return this; 048 } 049 050 public Long getRootProjectId() { 051 return rootProjectId; 052 } 053 054 public PurgeSnapshotQuery setRootProjectId(Long rootProjectId) { 055 this.rootProjectId = rootProjectId; 056 return this; 057 } 058 059 public String[] getScopes() { 060 return scopes;//NOSONAR May expose internal representation by returning reference to mutable object 061 } 062 063 public PurgeSnapshotQuery setScopes(String[] scopes) { 064 this.scopes = scopes; //NOSONAR May expose internal representation by incorporating reference to mutable object 065 return this; 066 } 067 068 public String[] getQualifiers() { 069 return qualifiers;//NOSONAR May expose internal representation by returning reference to mutable object 070 } 071 072 public PurgeSnapshotQuery setQualifiers(String[] qualifiers) { 073 this.qualifiers = qualifiers;//NOSONAR May expose internal representation by incorporating reference to mutable object 074 return this; 075 } 076 077 public String[] getStatus() { 078 return status;//NOSONAR May expose internal representation by returning reference to mutable object 079 } 080 081 public PurgeSnapshotQuery setStatus(String[] status) { 082 this.status = status; //NOSONAR org.sonar.core.purge.PurgeSnapshotQuery.setStatus(String[]) may expose internal representation 083 return this; 084 } 085 086 public Boolean getIslast() { 087 return islast; 088 } 089 090 public PurgeSnapshotQuery setIslast(Boolean islast) { 091 this.islast = islast; 092 return this; 093 } 094 095 public Boolean getNotPurged() { 096 return notPurged; 097 } 098 099 public PurgeSnapshotQuery setNotPurged(Boolean notPurged) { 100 this.notPurged = notPurged; 101 return this; 102 } 103 104 public Long getRootSnapshotId() { 105 return rootSnapshotId; 106 } 107 108 public PurgeSnapshotQuery setRootSnapshotId(Long rootSnapshotId) { 109 this.rootSnapshotId = rootSnapshotId; 110 return this; 111 } 112 113 public Long getResourceId() { 114 return resourceId; 115 } 116 117 public PurgeSnapshotQuery setResourceId(Long l) { 118 this.resourceId = l; 119 return this; 120 } 121 122 public Boolean getWithVersionEvent() { 123 return withVersionEvent; 124 } 125 126 public PurgeSnapshotQuery setWithVersionEvent(Boolean withVersionEvent) { 127 this.withVersionEvent = withVersionEvent; 128 return this; 129 } 130 }