All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hibernate.beanvalidation.tck.tests.integration.cdi.executable.BookingService Maven / Gradle / Ivy

There is a newer version: 3.0.1
Show newest version
/**
 * Jakarta Bean Validation TCK
 *
 * License: Apache License, Version 2.0
 * See the license.txt file in the root directory or .
 */
package org.hibernate.beanvalidation.tck.tests.integration.cdi.executable;

import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.Null;
import jakarta.validation.constraints.Size;

/**
 * @author Gunnar Morling
 */
public class BookingService {

	public interface IgnoredValidationGroup {
	}

	private int invocationCount = 0;

	@DecimalMin("10001")
	@Null(groups = IgnoredValidationGroup.class)
	public String placeBooking(@Size(min = 5) @Null(groups = IgnoredValidationGroup.class) String name) {
		invocationCount++;
		return name;
	}

	public int getInvocationCount() {
		return invocationCount;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy