001// 002// Generated by protoc, do not edit by hand. 003// 004package org.apache.activemq.store.kahadb.data; 005 006 007public final class KahaRemoveScheduledJobCommand extends KahaRemoveScheduledJobCommandBase<KahaRemoveScheduledJobCommand> implements org.apache.activemq.store.kahadb.JournalCommand<KahaRemoveScheduledJobCommand> { 008 009 public java.util.ArrayList<String> missingFields() { 010 java.util.ArrayList<String> missingFields = super.missingFields(); 011 if( !hasScheduler() ) { 012 missingFields.add("scheduler"); 013 } 014 if( !hasJobId() ) { 015 missingFields.add("job_id"); 016 } 017 if( !hasNextExecutionTime() ) { 018 missingFields.add("next_execution_time"); 019 } 020 return missingFields; 021 } 022 023 public void clear() { 024 super.clear(); 025 clearScheduler(); 026 clearJobId(); 027 clearNextExecutionTime(); 028 } 029 030 public KahaRemoveScheduledJobCommand clone() { 031 return new KahaRemoveScheduledJobCommand().mergeFrom(this); 032 } 033 034 public KahaRemoveScheduledJobCommand mergeFrom(KahaRemoveScheduledJobCommand other) { 035 if (other.hasScheduler()) { 036 setScheduler(other.getScheduler()); 037 } 038 if (other.hasJobId()) { 039 setJobId(other.getJobId()); 040 } 041 if (other.hasNextExecutionTime()) { 042 setNextExecutionTime(other.getNextExecutionTime()); 043 } 044 return this; 045 } 046 047 public int serializedSizeUnframed() { 048 if (memoizedSerializedSize != -1) 049 return memoizedSerializedSize; 050 051 int size = 0; 052 if (hasScheduler()) { 053 size += org.apache.activemq.protobuf.CodedOutputStream.computeStringSize(1, getScheduler()); 054 } 055 if (hasJobId()) { 056 size += org.apache.activemq.protobuf.CodedOutputStream.computeStringSize(2, getJobId()); 057 } 058 if (hasNextExecutionTime()) { 059 size += org.apache.activemq.protobuf.CodedOutputStream.computeInt64Size(3, getNextExecutionTime()); 060 } 061 memoizedSerializedSize = size; 062 return size; 063 } 064 065 public KahaRemoveScheduledJobCommand mergeUnframed(org.apache.activemq.protobuf.CodedInputStream input) throws java.io.IOException { 066 while (true) { 067 int tag = input.readTag(); 068 if ((tag & 0x07) == 4) { 069 return this; 070 } 071 switch (tag) { 072 case 0: 073 return this; 074 default: { 075 break; 076 } 077 case 10: 078 setScheduler(input.readString()); 079 break; 080 case 18: 081 setJobId(input.readString()); 082 break; 083 case 24: 084 setNextExecutionTime(input.readInt64()); 085 break; 086 } 087 } 088 } 089 public void writeUnframed(org.apache.activemq.protobuf.CodedOutputStream output) throws java.io.IOException { 090 if (hasScheduler()) { 091 output.writeString(1, getScheduler()); 092 } 093 if (hasJobId()) { 094 output.writeString(2, getJobId()); 095 } 096 if (hasNextExecutionTime()) { 097 output.writeInt64(3, getNextExecutionTime()); 098 } 099 } 100 101 public static KahaRemoveScheduledJobCommand parseUnframed(org.apache.activemq.protobuf.CodedInputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException { 102 return new KahaRemoveScheduledJobCommand().mergeUnframed(data).checktInitialized(); 103 } 104 105 public static KahaRemoveScheduledJobCommand parseUnframed(org.apache.activemq.protobuf.Buffer data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException { 106 return new KahaRemoveScheduledJobCommand().mergeUnframed(data).checktInitialized(); 107 } 108 109 public static KahaRemoveScheduledJobCommand parseUnframed(byte[] data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException { 110 return new KahaRemoveScheduledJobCommand().mergeUnframed(data).checktInitialized(); 111 } 112 113 public static KahaRemoveScheduledJobCommand parseUnframed(java.io.InputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException { 114 return new KahaRemoveScheduledJobCommand().mergeUnframed(data).checktInitialized(); 115 } 116 117 public static KahaRemoveScheduledJobCommand parseFramed(org.apache.activemq.protobuf.CodedInputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException { 118 return new KahaRemoveScheduledJobCommand().mergeFramed(data).checktInitialized(); 119 } 120 121 public static KahaRemoveScheduledJobCommand parseFramed(org.apache.activemq.protobuf.Buffer data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException { 122 return new KahaRemoveScheduledJobCommand().mergeFramed(data).checktInitialized(); 123 } 124 125 public static KahaRemoveScheduledJobCommand parseFramed(byte[] data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException { 126 return new KahaRemoveScheduledJobCommand().mergeFramed(data).checktInitialized(); 127 } 128 129 public static KahaRemoveScheduledJobCommand parseFramed(java.io.InputStream data) throws org.apache.activemq.protobuf.InvalidProtocolBufferException, java.io.IOException { 130 return new KahaRemoveScheduledJobCommand().mergeFramed(data).checktInitialized(); 131 } 132 133 public String toString() { 134 return toString(new java.lang.StringBuilder(), "").toString(); 135 } 136 137 public java.lang.StringBuilder toString(java.lang.StringBuilder sb, String prefix) { 138 if( hasScheduler() ) { 139 sb.append(prefix+"scheduler: "); 140 sb.append(getScheduler()); 141 sb.append("\n"); 142 } 143 if( hasJobId() ) { 144 sb.append(prefix+"job_id: "); 145 sb.append(getJobId()); 146 sb.append("\n"); 147 } 148 if( hasNextExecutionTime() ) { 149 sb.append(prefix+"next_execution_time: "); 150 sb.append(getNextExecutionTime()); 151 sb.append("\n"); 152 } 153 return sb; 154 } 155 156 public void visit(org.apache.activemq.store.kahadb.Visitor visitor) throws java.io.IOException { 157 visitor.visit(this); 158 } 159 160 public KahaEntryType type() { 161 return KahaEntryType.KAHA_REMOVE_SCHEDULED_JOB_COMMAND; 162 } 163 164 public boolean equals(Object obj) { 165 if( obj==this ) 166 return true; 167 168 if( obj==null || obj.getClass()!=KahaRemoveScheduledJobCommand.class ) 169 return false; 170 171 return equals((KahaRemoveScheduledJobCommand)obj); 172 } 173 174 public boolean equals(KahaRemoveScheduledJobCommand obj) { 175 if (hasScheduler() ^ obj.hasScheduler() ) 176 return false; 177 if (hasScheduler() && ( !getScheduler().equals(obj.getScheduler()) )) 178 return false; 179 if (hasJobId() ^ obj.hasJobId() ) 180 return false; 181 if (hasJobId() && ( !getJobId().equals(obj.getJobId()) )) 182 return false; 183 if (hasNextExecutionTime() ^ obj.hasNextExecutionTime() ) 184 return false; 185 if (hasNextExecutionTime() && ( getNextExecutionTime()!=obj.getNextExecutionTime() )) 186 return false; 187 return true; 188 } 189 190 public int hashCode() { 191 int rc=425904136; 192 if (hasScheduler()) { 193 rc ^= ( 1843257499^getScheduler().hashCode() ); 194 } 195 if (hasJobId()) { 196 rc ^= ( 71743896^getJobId().hashCode() ); 197 } 198 if (hasNextExecutionTime()) { 199 rc ^= ( 1882983858^(new Long(getNextExecutionTime())).hashCode() ); 200 } 201 return rc; 202 } 203 204} 205 206abstract class KahaRemoveScheduledJobCommandBase<T> extends org.apache.activemq.protobuf.BaseMessage<T> { 207 208 // required string scheduler = 1; 209 private java.lang.String f_scheduler = null; 210 private boolean b_scheduler; 211 212 public boolean hasScheduler() { 213 return this.b_scheduler; 214 } 215 216 public java.lang.String getScheduler() { 217 return this.f_scheduler; 218 } 219 220 public T setScheduler(java.lang.String scheduler) { 221 loadAndClear(); 222 this.b_scheduler = true; 223 this.f_scheduler = scheduler; 224 return (T)this; 225 } 226 227 public void clearScheduler() { 228 loadAndClear(); 229 this.b_scheduler = false; 230 this.f_scheduler = null; 231 } 232 233 // required string job_id = 2; 234 private java.lang.String f_jobId = null; 235 private boolean b_jobId; 236 237 public boolean hasJobId() { 238 return this.b_jobId; 239 } 240 241 public java.lang.String getJobId() { 242 return this.f_jobId; 243 } 244 245 public T setJobId(java.lang.String jobId) { 246 loadAndClear(); 247 this.b_jobId = true; 248 this.f_jobId = jobId; 249 return (T)this; 250 } 251 252 public void clearJobId() { 253 loadAndClear(); 254 this.b_jobId = false; 255 this.f_jobId = null; 256 } 257 258 // required int64 next_execution_time = 3; 259 private long f_nextExecutionTime = 0; 260 private boolean b_nextExecutionTime; 261 262 public boolean hasNextExecutionTime() { 263 return this.b_nextExecutionTime; 264 } 265 266 public long getNextExecutionTime() { 267 return this.f_nextExecutionTime; 268 } 269 270 public T setNextExecutionTime(long nextExecutionTime) { 271 loadAndClear(); 272 this.b_nextExecutionTime = true; 273 this.f_nextExecutionTime = nextExecutionTime; 274 return (T)this; 275 } 276 277 public void clearNextExecutionTime() { 278 loadAndClear(); 279 this.b_nextExecutionTime = false; 280 this.f_nextExecutionTime = 0; 281 } 282 283} 284