// Path: src/main/java/org/fuin/ddd4j/ddd/AggregateRootId.java
// public interface AggregateRootId extends EntityId {
// 
// }
// 
// Path: src/main/java/org/fuin/ddd4j/ddd/EntityType.java
// public interface EntityType extends Serializable {
// 
//     /**
//      * Returns the entity type name as string.
//      * 
//      * @return Unique entity type name.
//      */
//     public String asString();
// 
// }
// 
// Path: src/main/java/org/fuin/ddd4j/ddd/StringBasedEntityType.java
// @Immutable
// public final class StringBasedEntityType extends AbstractStringValueObject implements EntityType {
// 
//     private static final long serialVersionUID = 1000L;
// 
//     @NotEmpty
//     @Size(max = 255)
//     private final String str;
// 
//     /**
//      * Constructor with unique name to use.
//      * 
//      * @param str
//      *            Type name of an aggregate that is unique within all types of the context
//      */
//     public StringBasedEntityType(@NotEmpty @Size(max = 255) final String str) {
//         Contract.requireArgNotEmpty("str", str);
//         Contract.requireArgMaxLength("str", str, 255);
//         this.str = str;
//     }
// 
//     @Override
//     public final String asBaseType() {
//         return str;
//     }
// 
//     @Override
//     public final String toString() {
//         return str;
//     }
// 
// }


import java.util.UUID;
import org.fuin.objects4j.common.Immutable;
import jakarta.validation.constraints.NotNull;
import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.fuin.ddd4j.ddd.AggregateRootId;
import org.fuin.ddd4j.ddd.EntityType;
import org.fuin.ddd4j.ddd.StringBasedEntityType;
import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.vo.AbstractUuidValueObject;
import org.fuin.objects4j.vo.ValueObjectWithBaseType;

/**
 * Copyright (C) 2015 Michael Schnell. All rights reserved. 
 * http://www.fuin.org/
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 3 of the License, or (at your option) any
 * later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library. If not, see http://www.gnu.org/licenses/.
 */
package org.fuin.ddd4j.test;




/**
 * Unique identifier of a customer.
 */
@Immutable
@XmlJavaTypeAdapter(VendorIdConverter.class)
public final class VendorId extends AbstractUuidValueObject implements AggregateRootId, ValueObjectWithBaseType<UUID> {

    private static final long serialVersionUID = 1000L;

    /** Type of entity this identifier represents. */

// Path: src/main/java/org/fuin/ddd4j/ddd/AggregateRootId.java
// public interface AggregateRootId extends EntityId {
// 
// }
// 
// Path: src/main/java/org/fuin/ddd4j/ddd/EntityType.java
// public interface EntityType extends Serializable {
// 
//     /**
//      * Returns the entity type name as string.
//      * 
//      * @return Unique entity type name.
//      */
//     public String asString();
// 
// }
// 
// Path: src/main/java/org/fuin/ddd4j/ddd/StringBasedEntityType.java
// @Immutable
// public final class StringBasedEntityType extends AbstractStringValueObject implements EntityType {
// 
//     private static final long serialVersionUID = 1000L;
// 
//     @NotEmpty
//     @Size(max = 255)
//     private final String str;
// 
//     /**
//      * Constructor with unique name to use.
//      * 
//      * @param str
//      *            Type name of an aggregate that is unique within all types of the context
//      */
//     public StringBasedEntityType(@NotEmpty @Size(max = 255) final String str) {
//         Contract.requireArgNotEmpty("str", str);
//         Contract.requireArgMaxLength("str", str, 255);
//         this.str = str;
//     }
// 
//     @Override
//     public final String asBaseType() {
//         return str;
//     }
// 
//     @Override
//     public final String toString() {
//         return str;
//     }
// 
// }


// Path: src/test/java/org/fuin/ddd4j/test/VendorId.java
import java.util.UUID;
import org.fuin.objects4j.common.Immutable;
import jakarta.validation.constraints.NotNull;
import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.fuin.ddd4j.ddd.AggregateRootId;
import org.fuin.ddd4j.ddd.EntityType;
import org.fuin.ddd4j.ddd.StringBasedEntityType;
import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.vo.AbstractUuidValueObject;
import org.fuin.objects4j.vo.ValueObjectWithBaseType;

/**
 * Copyright (C) 2015 Michael Schnell. All rights reserved. 
 * http://www.fuin.org/
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 3 of the License, or (at your option) any
 * later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library. If not, see http://www.gnu.org/licenses/.
 */
package org.fuin.ddd4j.test;




/**
 * Unique identifier of a customer.
 */
@Immutable
@XmlJavaTypeAdapter(VendorIdConverter.class)
public final class VendorId extends AbstractUuidValueObject implements AggregateRootId, ValueObjectWithBaseType<UUID> {

    private static final long serialVersionUID = 1000L;

    /** Type of entity this identifier represents. */

    public static final EntityType ENTITY_TYPE = new StringBasedEntityType("Vendor");
