org.apache.cayenne.lifecycle.id.EntityIdCoder.class Maven / Gradle / Ivy
The newest version!
???? 7? -org/apache/cayenne/lifecycle/id/EntityIdCoder :
java/lang/String indexOf (Ljava/lang/String;)I
length ()I "java/lang/IllegalArgumentException makeConcatWithConstants &(Ljava/lang/String;)Ljava/lang/String;
(Ljava/lang/String;)V
substring (II)Ljava/lang/String; .
! "
startsWith (Ljava/lang/String;)Z $ % & TEMP_PREFIX_LENGTH I
( ) (I)Ljava/lang/String;
+ , - . java/lang/Object ()V
0 1 2 3 4 org/apache/cayenne/map/ObjEntity getName ()Ljava/lang/String; 6 7 8
entityName Ljava/lang/String; : java/util/TreeMap
9 , = > ?
converters Ljava/util/SortedMap;
0 A B C
getAttributes ()Ljava/util/Collection; E F G H I java/util/Collection iterator ()Ljava/util/Iterator; K L M N O java/util/Iterator hasNext ()Z K Q R S next ()Ljava/lang/Object; U #org/apache/cayenne/map/ObjAttribute
T W X O isPrimaryKey
T Z [ 4 getDbAttributeName
T ] ^ _ getJavaClass ()Ljava/lang/Class;
a b c create L(Ljava/lang/Class;)Lorg/apache/cayenne/lifecycle/id/EntityIdCoder$Converter; e f g h i java/util/SortedMap put 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
0 k l m getDbEntity #()Lorg/apache/cayenne/map/DbEntity;
o p q r s org/apache/cayenne/map/DbEntity getPrimaryKeys ()Ljava/util/List; u F v java/util/List x "org/apache/cayenne/map/DbAttribute
w 1 e { | } containsKey (Ljava/lang/Object;)Z
? ? ? ? #org/apache/cayenne/dba/TypesMapping getJavaBySqlType 8(Lorg/apache/cayenne/map/DbAttribute;)Ljava/lang/String;
? ? ? ^ ? org/apache/cayenne/util/Util %(Ljava/lang/String;)Ljava/lang/Class; ? java/lang/ClassNotFoundException ? *org/apache/cayenne/CayenneRuntimeException
? ? ? =(Ljava/lang/String;Ljava/lang/Throwable;[Ljava/lang/Object;)V e ? ? O isEmpty e ? ? size??
? ? ? ? ? java/lang/Math ceil (D)D ? ? & idSize ? ? ? ? O org/apache/cayenne/ObjectId isTemporary ? ? ? O isReplacementIdAttached
? ? ? toTempIdString 1(Lorg/apache/cayenne/ObjectId;)Ljava/lang/String;
? ? ? toPermIdString ? java/lang/StringBuilder
? ,
? ? ? ? append -(Ljava/lang/String;)Ljava/lang/StringBuilder; ? ? ? 4
getEntityName ? ? ? ? getKey ()[B
? ? ? ? ? org/apache/cayenne/util/IDUtil appendFormattedByte (Ljava/lang/Appendable;B)V
? ? ? 4 toString ? ? ? ?
getIdSnapshot ()Ljava/util/Map; e ? ? ? entrySet ()Ljava/util/Set; ? F ?
java/util/Set ? java/util/Map$Entry ? ? ? S ? ? ? ? ?
java/util/Map get &(Ljava/lang/Object;)Ljava/lang/Object; ? ? ? S getValue ? 7org/apache/cayenne/lifecycle/id/EntityIdCoder$Converter ? ? ? ? toUuid &(Ljava/lang/Object;)Ljava/lang/String;
? ? ?
decodeTemp (Ljava/lang/String;)[B ? ? ? ? of 3(Ljava/lang/String;[B)Lorg/apache/cayenne/ObjectId; ? UTF-8
? ? ? ? ? java/net/URLDecoder decode 8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; ? $java/io/UnsupportedEncodingException ? Unsupported encoding ? ? ? ? fromStringId &(Ljava/lang/String;)Ljava/lang/Object; ? ? U(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;)Lorg/apache/cayenne/ObjectId; java/util/HashMap
(I)V java/util/StringTokenizer
'(Ljava/lang/String;Ljava/lang/String;)V
countTokens ?
4 nextToken ? f ? ? @(Ljava/lang/String;Ljava/util/Map;)Lorg/apache/cayenne/ObjectId;
charAt (I)C
! java/lang/Character digit (II)I# java/lang/NullPointerException% Null type
" ( java/lang/Long
*+,-. java/lang/Class isAssignableFrom (Ljava/lang/Class;)Z 0 ?1 ;()Lorg/apache/cayenne/lifecycle/id/EntityIdCoder$Converter;3 java/lang/Integer 0 0
* 1 ID_SEPARATOR
ConstantValue TEMP_ID_PREFIX Signature eLjava/util/SortedMap;>; Code LineNumberTable LocalVariableTable id separator name
StackMapTable %(Lorg/apache/cayenne/map/ObjEntity;)V attribute %Lorg/apache/cayenne/map/ObjAttribute; e "Ljava/lang/ClassNotFoundException; type $Lorg/apache/cayenne/map/DbAttribute; this /Lorg/apache/cayenne/lifecycle/id/EntityIdCoder; entity "Lorg/apache/cayenne/map/ObjEntity;
toStringId Lorg/apache/cayenne/ObjectId; b B buffer Ljava/lang/StringBuilder;V [B value Ljava/lang/Object; entry Ljava/util/Map$Entry; idValues Ljava/util/Map; LocalVariableTypeTable eLjava/util/Map$Entry;>; 5Ljava/util/Map;
toObjectId 1(Ljava/lang/String;)Lorg/apache/cayenne/ObjectId; decoded &Ljava/io/UnsupportedEncodingException; stringId idMap toks Ljava/util/StringTokenizer; index c1 c2 i
byteString bytes Ljava/lang/Class; Ljava/lang/Class<*>; R(Ljava/lang/Class<*>;)Lorg/apache/cayenne/lifecycle/id/EntityIdCoder$Converter<*>; lambda$create$0
SourceFile EntityIdCoder.java NestMembers BootstrapMethodsx Invalid String id: z Can't instantiate class | Entity has no PK defined: ~ !Invalid String ID for entity : ??
'??? valueOf $(Ljava/lang/String;)Ljava/lang/Long;?
2??? '(Ljava/lang/String;)Ljava/lang/Integer;?
?q ?? Unsupported ID type: ?
??? ? $java/lang/invoke/StringConcatFactory ?(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;?
????? "java/lang/invoke/LambdaMetafactory metafactory ?(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; InnerClasses Converter Entry? %java/lang/invoke/MethodHandles$Lookup? java/lang/invoke/MethodHandles Lookup ! + 8 8 9 : 8 9 % &