The ObjectMapper .NET Project

Official blog of the AdFactum ObjectMapper .NET

Archive for April, 2008

Exception: WrongTypeException

Posted by Gerhard Stephan on 21st April 2008

The WrongTypeException will always be thrown if your object implements the ICreateObject interface, but does not create the expected object type as the result value.

Here’s an example for this:

    /// <summary>

    /// This class creates the wrong object type and causes the WrongTypeException

    /// </summary>

    public class WrongType : BaseVO, ICreateObject

    {

        private int number;

 

        /// <summary>

        /// Gets or sets the number.

        /// </summary>

        /// <value>The number.</value>

        [PropertyName("IntNumber")]

        public int Number

        {

            get { return number; }

            set { number = value; }

        }

 

        /// <summary>

        /// Creates the new object.

        /// </summary>

        /// <returns></returns>

        public IValueObject CreateNewObject()

        {

            return new NullValue();

        }

    }

 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 (No Ratings Yet)
Loading ... Loading ...

Posted in Exceptions | No Comments »

Exception: TransactionAlreadyOpenException

Posted by Gerhard Stephan on 21st April 2008

 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 (No Ratings Yet)
Loading ... Loading ...

Posted in Exceptions | No Comments »

Exception: SqlCoreException

Posted by Gerhard Stephan on 21st April 2008

 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 (No Ratings Yet)
Loading ... Loading ...

Posted in Exceptions | No Comments »

Exception: PersisterDoesNotSupportRepositoryException

Posted by Gerhard Stephan on 17th April 2008

 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 (No Ratings Yet)
Loading ... Loading ...

Posted in Exceptions | No Comments »

Exception: NoOpenTransactionException

Posted by Gerhard Stephan on 17th April 2008

 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 (No Ratings Yet)
Loading ... Loading ...

Posted in Exceptions | No Comments »

Exception: MissingSetterException

Posted by Gerhard Stephan on 17th April 2008

 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 (No Ratings Yet)
Loading ... Loading ...

Posted in Exceptions | No Comments »

Exception: DirtyObjectException

Posted by Gerhard Stephan on 17th April 2008

 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 Votes | Average: 0 out of 5 (No Ratings Yet)
Loading ... Loading ...

Posted in Exceptions | No Comments »