001
014
015 package com.liferay.portlet.asset.model;
016
017 import com.liferay.portal.kernel.util.Validator;
018
019
022 public class AssetQueryRule {
023
024 public AssetQueryRule(
025 boolean contains, boolean andOperator, String name, String[] values) {
026
027 _contains = contains;
028 _andOperator = andOperator;
029 _name = name;
030 _values = values;
031 }
032
033 @Override
034 public boolean equals(Object obj) {
035 if (this == obj) {
036 return true;
037 }
038
039 if (!(obj instanceof AssetQueryRule)) {
040 return false;
041 }
042
043 AssetQueryRule assetQueryRule = (AssetQueryRule)obj;
044
045 if (Validator.equals(_contains, assetQueryRule._contains) &&
046 Validator.equals(_andOperator, assetQueryRule._andOperator) &&
047 Validator.equals(_name, assetQueryRule._name)) {
048
049 return true;
050 }
051
052 return false;
053 }
054
055 public String getName() {
056 return _name;
057 }
058
059 public String[] getValues() {
060 return _values;
061 }
062
063 public boolean isAndOperator() {
064 return _andOperator;
065 }
066
067 public boolean isContains() {
068 return _contains;
069 }
070
071 public void setAndOperator(boolean andOperator) {
072 _andOperator = andOperator;
073 }
074
075 public void setContains(boolean contains) {
076 _contains = contains;
077 }
078
079 public void setName(String name) {
080 _name = name;
081 }
082
083 public void setValues(String[] values) {
084 _values = values;
085 }
086
087 private boolean _andOperator;
088 private boolean _contains;
089 private String _name;
090 private String[] _values;
091
092 }