/*
 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
 * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 * 
 * $Id$
 */

package com.sun.ts.tests.jaxrs.spec.resource.valueofandfromstring;

import com.sun.ts.tests.jaxrs.ee.rs.ParamEntityPrototype;

/**
 * If both methods are present then valueOf MUST be used unless the type is an 
 * enum in which case fromString MUST be used.
 */
public class ParamEntityWithFromStringAndValueOf extends ParamEntityPrototype {

	public static ParamEntityWithFromStringAndValueOf valueOf(String arg) {
		ParamEntityWithFromStringAndValueOf newEntity = new ParamEntityWithFromStringAndValueOf();
		newEntity.value = EnumWithFromStringAndValueOf.VALUEOF.name();
		return newEntity;
	}

	public static ParamEntityWithFromStringAndValueOf fromString(String arg) {
		ParamEntityWithFromStringAndValueOf newEntity = new ParamEntityWithFromStringAndValueOf();
		newEntity.value = EnumWithFromStringAndValueOf.FROMSTRING.name();
		return newEntity;
	}
}
