public class ModelNodeUtil {
public static Long getLongIfSetOrGetDefault(final OperationContext context, final ModelNode dataSourceNode, final SimpleAttributeDefinition key) throws OperationFailedException {
ModelNode resolvedNode = key.resolveModelAttribute(context, dataSourceNode);
return resolvedNode.isDefined() ? resolvedNode.asLong() : null;
}
public static Integer getIntIfSetOrGetDefault(final OperationContext context, final ModelNode dataSourceNode, final SimpleAttributeDefinition key) throws OperationFailedException {
ModelNode resolvedNode = key.resolveModelAttribute(context, dataSourceNode);