001/*
002 * Commit.java July 2006
003 *
004 * Copyright (C) 2006, Niall Gallagher <niallg@users.sf.net>
005 *
006 * Licensed under the Apache License, Version 2.0 (the "License");
007 * you may not use this file except in compliance with the License.
008 * You may obtain a copy of the License at
009 *
010 *     http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
015 * implied. See the License for the specific language governing 
016 * permissions and limitations under the License.
017 */
018
019package org.simpleframework.xml.core;
020
021import java.lang.annotation.RetentionPolicy;
022import java.lang.annotation.Retention;
023
024/**
025 * The <code>Commit</code> annotation is used to mark a method within
026 * a serializable object that requires a callback from the persister
027 * once the deserialization completes. The commit method is invoked
028 * by the <code>Persister</code> after all fields have been assigned
029 * and after the validation method has been invoked, if the object
030 * has a method marked with the <code>Validate</code> annotation.
031 * <p>
032 * Typically the commit method is used to complete deserialization
033 * by allowing the object to build further data structures from the
034 * fields that have been created from the deserialization process.
035 * The commit method must be a no argument method or a method that
036 * takes a single <code>Map</code> object argument, and may throw an
037 * exception, in which case the deserialization process terminates.
038 * 
039 * @author Niall Gallagher
040 * 
041 * @see org.simpleframework.xml.core.Validate
042 */
043@Retention(RetentionPolicy.RUNTIME)
044public @interface Commit {
045}